\input{preamble}

% OK, start here.
%
\begin{document}

\title{Homological Algebra}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
Basic homological algebra will be explained in this document.
We add as needed in the other parts, since there is clearly
an infinite amount of this stuff around.
A reference is \cite{Maclane}.

\section{Basic notions}
\label{section-topology-basic}

\noindent
The following notions are considered basic and will not be defined,
and or proved. This does not mean they are all necessarily easy or
well known.

\begin{enumerate}
\item Nothing yet.
\end{enumerate}




\section{Preadditive and additive categories}
\label{section-additive-categories}

\noindent
Here is the definition of a preadditive category.

\begin{definition}
\label{definition-preadditive}
A category $\mathcal{A}$ is called {\it preadditive} if each
morphism set $\Mor_\mathcal{A}(x, y)$ is endowed
with the structure of an abelian group such that the
compositions
$$
\Mor(x, y) \times \Mor(y, z)
\longrightarrow
\Mor(x, z)
$$
are bilinear. A functor $F : \mathcal{A} \to \mathcal{B}$ of
preadditive categories is called {\it additive} if and only
if $F : \Mor(x, y) \to \Mor(F(x), F(y))$
is a homomorphism of abelian groups for all
$x, y \in \Ob(\mathcal{A})$.
\end{definition}

\noindent
In particular for every $x, y$ there exists at least
one morphism $x \to y$, namely the zero map.

\begin{lemma}
\label{lemma-preadditive-zero}
Let $\mathcal{A}$ be a preadditive category.
Let $x$ be an object of $\mathcal{A}$.
The following are equivalent
\begin{enumerate}
\item $x$ is an initial object,
\item $x$ is a final object, and
\item $\text{id}_x = 0$ in $\Mor_\mathcal{A}(x, x)$.
\end{enumerate}
Furthermore, if such an object $0$ exists, then a morphism
$\alpha : y \to z$ factors through $0$ if and only if $\alpha = 0$.
\end{lemma}

\begin{proof}
First assume that $x$ is either (1) initial or (2) final.
In both cases, it follows that $\Mor(x,x)$ is a trivial abelian group
containing $\text{id}_x$, thus $\text{id}_x = 0$ in
$\Mor(x, x)$, which shows that each of (1) and (2) implies (3).

\medskip\noindent
Now assume that $\text{id}_x = 0$ in $\Mor(x,x)$. Let $y$
be an arbitrary object of $\mathcal{A}$ and let $f \in \Mor(x ,y)$.
Denote $C : \Mor(x,x) \times \Mor(x,y) \to \Mor(x,y)$ the composition map.
Then $f = C(0, f)$ and since $C$ is bilinear we have $C(0, f) = 0$.
Thus $f = 0$. Hence $x$ is initial in $\mathcal{A}$.
A similar argument for $f \in \Mor(y, x)$ can be used to show that
$x$ is also final. Thus (3) implies both (1) and (2).
\end{proof}

\begin{definition}
\label{definition-zero-object}
In a preadditive category $\mathcal{A}$, we call an object that is both
final and initial (as in Lemma \ref{lemma-preadditive-zero}) a
{\it zero object} and denote it $0$.
\end{definition}

\begin{lemma}
\label{lemma-preadditive-direct-sum}
Let $\mathcal{A}$ be a preadditive category.
Let $x, y \in \Ob(\mathcal{A})$.
If the product $x \times y$ exists, then so does
the coproduct $x \amalg y$.
If the coproduct $x \amalg y$ exists, then so does
the product $x \times y$. In this case
also $x \amalg y \cong x \times y$.
\end{lemma}

\begin{proof}
Suppose that $z = x \times y$ with projections
$p : z \to x$ and $q : z \to y$. Denote $i : x \to z$
the morphism corresponding to $(1, 0)$. Denote $j : y \to z$
the morphism corresponding to $(0, 1)$. Thus we have the
commutative diagram
$$
\xymatrix{
x \ar[rr]^1 \ar[rd]^i & & x \\
& z \ar[ru]^p \ar[rd]^q & \\
y \ar[rr]^1 \ar[ru]^j & & y
}
$$
where the diagonal compositions are zero. It follows that
$i \circ p + j \circ q : z \to z$ is the identity since
it is a morphism which upon composing with $p$ gives $p$
and upon composing with $q$ gives $q$.
Suppose given morphisms $a : x \to w$ and $b : y \to w$.
Then we can form the map $a \circ p + b \circ q : z \to w$.
In this way we get a bijection $\Mor(z, w)
= \Mor(x, w) \times \Mor(y, w)$ which
shows that $z = x \amalg y$.

\medskip\noindent
We leave it to the reader to construct the morphisms
$p, q$ given a coproduct $x \amalg y$ instead of a
product.
\end{proof}

\begin{definition}
\label{definition-direct-sum}
Given a pair of objects $x, y$ in a preadditive category $\mathcal{A}$,
the {\it direct sum} $x \oplus y$ of $x$ and $y$ is the direct
product $x \times y$ endowed with the morphisms
$i, j, p, q$ as in Lemma \ref{lemma-preadditive-direct-sum} above.
\end{definition}

\begin{remark}
\label{remark-direct-sum}
Note that the proof of Lemma \ref{lemma-preadditive-direct-sum}
shows that given $p$ and $q$ the morphisms $i$, $j$ are uniquely
determined by the rules $p \circ i = \text{id}_x$,
$q \circ j = \text{id}_y$, $p \circ j = 0$, $q \circ i = 0$.
Moreover, we automatically have
$i \circ p + j \circ q = \text{id}_{x \oplus y}$.
Similarly, given $i$, $j$ the morphisms $p$ and $q$ are uniquely determined.
Finally, given objects $x, y, z$ and morphisms
$i : x \to z$, $j : y \to z$, $p : z \to x$ and
$q : z \to y$ such that $p \circ i = \text{id}_x$,
$q \circ j = \text{id}_y$, $p \circ j = 0$, $q \circ i = 0$
and $i \circ p + j \circ q = \text{id}_z$, then $z$
is the direct sum of $x$ and $y$ with the four morphisms
equal to $i, j, p, q$.
\end{remark}

\begin{lemma}
\label{lemma-additive-additive}
Let $\mathcal{A}$, $\mathcal{B}$ be preadditive categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be an additive functor.
Then $F$ transforms direct sums to direct sums and zero to zero.
\end{lemma}

\begin{proof}
Suppose $F$ is additive. A direct sum $z$
of $x$ and $y$ is characterized by having morphisms
$i : x \to z$, $j : y \to z$, $p : z \to x$ and
$q : z \to y$ such that $p \circ i = \text{id}_x$,
$q \circ j = \text{id}_y$, $p \circ j = 0$, $q \circ i = 0$
and $i \circ p + j \circ q = \text{id}_z$, according
to Remark \ref{remark-direct-sum}. Clearly $F(x), F(y), F(z)$
and the morphisms $F(i), F(j), F(p), F(q)$ satisfy exactly the
same relations (by additivity) and we see that $F(z)$ is
a direct sum of $F(x)$ and $F(y)$.
Hence, $F$ transforms direct sums to direct sums.

\medskip\noindent
To see that $F$ transforms zero to zero, use the
characterization (3) of the zero object in
Lemma \ref{lemma-preadditive-zero}.
\end{proof}

\begin{definition}
\label{definition-additive-category}
A category $\mathcal{A}$ is called {\it additive}
if it is preadditive and finite products exist, in other
words it has a zero object and direct sums.
\end{definition}

\noindent
Namely the empty product is a finite product and
if it exists, then it is a final object.

\begin{definition}
\label{definition-kernel}
Let $\mathcal{A}$ be a preadditive category.
Let $f : x \to y$ be a morphism.
\begin{enumerate}
\item A {\it kernel} of $f$ is a morphism
$i : z \to x$ such that (a) $f \circ i = 0$ and (b)
for any $i' : z' \to x$ such that $f \circ i' = 0$ there
exists a unique morphism $g : z' \to z$ such that
$i' = i \circ g$.
\item If the kernel of $f$ exists, then we denote
this $\Ker(f) \to x$.
\item A {\it cokernel} of $f$ is a morphism
$p : y \to z$ such that (a) $p \circ f = 0$ and (b)
for any $p' : y \to z'$ such that $p' \circ f = 0$ there
exists a unique morphism $g : z \to z'$ such that
$p' = g \circ p$.
\item If a cokernel of $f$ exists we denote this
$y \to \Coker(f)$.
\item If a kernel of $f$ exists, then a {\it coimage
of $f$} is a cokernel for the morphism $\Ker(f) \to x$.
\item If a kernel and coimage exist then we denote this
$x \to \Coim(f)$.
\item If a cokernel of $f$ exists, then the {\it image of
$f$} is a kernel of the morphism $y \to \Coker(f)$.
\item If a cokernel and image of $f$ exist then we denote
this $\Im(f) \to y$.
\end{enumerate}
\end{definition}

\noindent
In the above definition, we have spoken of ``the kernel'' and
``the cokernel'', tacitly using their uniqueness
up to unique isomorphism. This follows from the Yoneda lemma
(Categories, Section \ref{categories-section-opposite})
because the kernel of $f : x \to y$ represents the functor
sending an object $z$ to the set
$\Ker(\Mor_\mathcal{A}(z, x) \to \Mor_\mathcal{A}(z, y))$.
The case of cokernels is dual.

\medskip\noindent
We first relate the direct sum to kernels as follows.

\begin{lemma}
\label{lemma-additive-cat-biproduct-kernel}
Let $\mathcal{C}$ be a preadditive category.
Let $x \oplus y$ with morphisms $i, j, p, q$ as in
Lemma \ref{lemma-preadditive-direct-sum}
be a direct sum in $\mathcal{C}$. Then $i : x \to x \oplus y$
is a kernel of $q : x \oplus y \rightarrow y$. Dually, $p$ is
a cokernel for $j$.
\end{lemma}

\begin{proof}
Let $f : z' \to x \oplus y$ be a morphism such that $q \circ f = 0$.
We have to show that there exists a unique morphism $g : z' \to x$
such that $f = i \circ g$. Since $i \circ p + j \circ q$ is the identity on
$x \oplus y$ we see that
$$
f = (i \circ p + j \circ q) \circ f = i \circ p \circ f
$$
and hence $g = p \circ f$ works. Uniqueness holds because $p \circ i$
is the identity on $x$. The proof of the second statement is dual.
\end{proof}

\begin{lemma}
\label{lemma-kernel-mono}
Let $\mathcal{C}$ be a preadditive category.
Let $f : x \to y$ be a morphism in $\mathcal{C}$.
\begin{enumerate}
\item If a kernel of $f$ exists, then
this kernel is a monomorphism.
\item If a cokernel of $f$ exists, then
this cokernel is an epimorphism.
\item If a kernel and coimage of $f$ exist, then
the coimage is an epimorphism.
\item If a cokernel and image of $f$ exist, then
the image is a monomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) follows easily from the uniqueness required in the
definition of a kernel. The proof of (2) is dual.
Part (3) follows from (2), since the coimage is a cokernel.
Similarly, (4) follows from (1).
\end{proof}

\begin{lemma}
\label{lemma-coim-im-map}
Let $f : x \to y$ be a morphism in a preadditive category
such that the kernel, cokernel, image and coimage all exist.
Then $f$ can be factored uniquely as
$x \to \Coim(f) \to \Im(f) \to y$.
\end{lemma}

\begin{proof}
There is a canonical morphism $\Coim(f) \to y$
because $\Ker(f) \to x \to y$ is zero.
The composition $\Coim(f) \to y \to \Coker(f)$
is zero, because it is the unique morphism which gives
rise to the morphism $x \to y \to \Coker(f)$ which
is zero
(the uniqueness follows from
Lemma \ref{lemma-kernel-mono} (3)).
Hence $\Coim(f) \to y$ factors uniquely through
$\Im(f) \to y$, which gives us the desired map.
\end{proof}

\begin{example}
\label{example-not-abelian}
Let $k$ be a field.
Consider the category
of filtered vector spaces over $k$.
(See Definition \ref{definition-filtered}.)
Consider the filtered vector spaces $(V, F)$ and $(W, F)$ with
$V = W = k$ and
$$
F^iV
=
\left\{
\begin{matrix}
V & \text{if} & i < 0 \\
0 & \text{if} & i \geq 0
\end{matrix}
\right.
\text{ and }
F^iW
=
\left\{
\begin{matrix}
W & \text{if} & i \leq 0 \\
0 & \text{if} & i > 0
\end{matrix}
\right.
$$
The map $f : V \to W$ corresponding to $\text{id}_k$ on the underlying
vector spaces has trivial kernel and cokernel but is not
an isomorphism. Note also that $\Coim(f) = V$ and $\Im(f) = W$.
This means that the category of filtered vector spaces over $k$
is not abelian.
\end{example}





\section{Karoubian categories}
\label{section-karoubian}

\noindent
Skip this section on a first reading.

\begin{definition}
\label{definition-karoubian}
Let $\mathcal{C}$ be a preadditive category. We say $\mathcal{C}$
is {\it Karoubian} if every idempotent endomorphism of an object
of $\mathcal{C}$ has a kernel.
\end{definition}

\noindent
The dual notion would be that every idempotent endomorphism of an
object has a cokernel. However, in view of the (dual of the)
following lemma that would be an equivalent notion.

\begin{lemma}
\label{lemma-karoubian}
Let $\mathcal{C}$ be a preadditive category. The following
are equivalent
\begin{enumerate}
\item $\mathcal{C}$ is Karoubian,
\item every idempotent endomorphism of an object of $\mathcal{C}$ has a
cokernel, and
\item given an idempotent endomorphism $p : z \to z$ of $\mathcal{C}$
there exists a direct sum decomposition $z = x \oplus y$ such
that $p$ corresponds to the projection onto $y$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1) and let $p : z \to z$ be as in (3).
Let $x = \Ker(p)$ and $y = \Ker(1 - p)$. There are maps
$x \to z$ and $y \to z$. Since $(1 - p)p = 0$ we see that $p : z \to z$
factors through $y$, hence we obtain a morphism $z \to y$. Similarly
we obtain a morphism $z \to x$. We omit the verification that these
four morphisms induce an isomorphism $x = y \oplus z$ as in
Remark \ref{remark-direct-sum}.
Thus (1) $\Rightarrow$ (3). The implication (2) $\Rightarrow$ (3)
is dual. Finally, condition (3) implies (1) and (2) by
Lemma \ref{lemma-additive-cat-biproduct-kernel}.
\end{proof}

\begin{lemma}
\label{lemma-projectors-have-images}
Let $\mathcal{D}$ be a preadditive category.
\begin{enumerate}
\item If $\mathcal{D}$ has countable products and kernels of maps which
have a right inverse, then $\mathcal{D}$ is Karoubian.
\item If $\mathcal{D}$ has countable coproducts and cokernels of
maps which have a left inverse, then $\mathcal{D}$ is Karoubian.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $X$ be an object of $\mathcal{D}$ and let $e : X \to X$ be an idempotent.
The functor
$$
W \longmapsto \Ker(
\Mor_\mathcal{D}(W, X)
\xrightarrow{e}
\Mor_\mathcal{D}(W, X)
)
$$
is representable if and only if $e$ has a kernel. Note that for any
abelian group $A$ and idempotent endomorphism $e : A \to A$ we have
$$
\Ker(e : A \to A)
= \Ker(\Phi :
\prod\nolimits_{n \in \mathbf{N}} A
\to
\prod\nolimits_{n \in \mathbf{N}} A
)
$$
where
$$
\Phi(a_1, a_2, a_3, \ldots) = (ea_1 + (1 - e)a_2, ea_2 + (1 - e)a_3, \ldots)
$$
Moreover, $\Phi$ has the right inverse
$$
\Psi(a_1, a_2, a_3, \ldots) =
(a_1, (1 - e)a_1 + ea_2, (1 - e)a_2 + ea_3, \ldots).
$$
Hence (1) holds. The proof of (2) is dual (using the dual definition
of a Karoubian category, namely condition (2) of
Lemma \ref{lemma-karoubian}).
\end{proof}









\section{Abelian categories}
\label{section-abelian-categories}

\noindent
An abelian category is a category satisfying just enough axioms so the
snake lemma holds. An axiom (that is sometimes forgotten)
is that the canonical map $\Coim(f) \to \Im(f)$
of Lemma \ref{lemma-coim-im-map} is always an isomorphism.
Example \ref{example-not-abelian} shows that it is necessary.

\begin{definition}
\label{definition-abelian-category}
A category $\mathcal{A}$ is {\it abelian} if
it is additive, if all kernels and cokernels exist,
and if the natural map $\Coim(f) \to \Im(f)$
is an isomorphism for all morphisms $f$ of
$\mathcal{A}$.
\end{definition}

\begin{lemma}
\label{lemma-abelian-opposite}
Let $\mathcal{A}$ be a preadditive category.
The additions on sets of morphisms make
$\mathcal{A}^{opp}$ into a preadditive category.
Furthermore, $\mathcal{A}$ is additive if and only if $\mathcal{A}^{opp}$
is additive, and
$\mathcal{A}$ is abelian if and only if $\mathcal{A}^{opp}$ is abelian.
\end{lemma}

\begin{proof}
The first statement is straightforward.
To see that $\mathcal{A}$ is additive if and only if $\mathcal{A}^{opp}$
is additive, recall that additivity can be characterized by
the existence of a zero object and direct sums, which are both
preserved when passing to the opposite category.
Finally, to see that
$\mathcal{A}$ is abelian if and only if $\mathcal{A}^{opp}$ is abelian,
observes that kernels, cokernels, images and coimages in
$\mathcal{A}^{opp}$ correspond to
cokernels, kernels, coimages and images in $\mathcal{A}$,
respectively.
\end{proof}

\begin{definition}
\label{definition-injective-surjective}
Let $f : x \to y$ be a morphism in an abelian category.
\begin{enumerate}
\item We say $f$ is {\it injective} if $\Ker(f) = 0$.
\item We say $f$ is {\it surjective} if $\Coker(f) = 0$.
\end{enumerate}
If $x \to y$ is injective, then we say that $x$ is a {\it subobject}
of $y$ and we use the notation $x \subset y$. If $x \to y$ is
surjective, then we say that $y$ is a {\it quotient} of $x$.
\end{definition}

\begin{lemma}
\label{lemma-characterize-injective}
Let $f : x \to y$ be a morphism in an abelian category $\mathcal{A}$. Then
\begin{enumerate}
\item $f$ is injective if and only if $f$ is a monomorphism,
\item $f$ is surjective if and only if $f$ is an epimorphism, and
\item $f$ is an isomorphism if and only if $f$ is injective and surjective.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Recall that $\Ker(f)$ is an object representing the
functor sending $z$ to
$\Ker(\Mor_\mathcal{A}(z, x) \to \Mor_\mathcal{A}(z, y))$, see
Definition \ref{definition-kernel}.
Thus $\Ker(f)$ is $0$ if and only if
$\Mor_\mathcal{A}(z, x) \to \Mor_\mathcal{A}(z, y)$
is injective for all $z$ if and only if $f$ is a monomorphism.
The proof of (2) is similar.
For the proof of (3) note that an isomorphism is both a monomorphism
and epimorphism, which by (1), (2) proves $f$ is injective
and surjective. If $f$ is both injective and surjective, then
$x = \Coim(f)$ and $y = \Im(f)$ whence $f$ is an isomorphism.
\end{proof}

\noindent
In an abelian category, if $x \subset y$ is a subobject,
then we denote
$$
y/x = \Coker(x \to y).
$$

\begin{lemma}
\label{lemma-colimit-abelian-category}
Let $\mathcal{A}$ be an abelian category.
All finite limits and finite colimits exist in $\mathcal{A}$.
\end{lemma}

\begin{proof}
To show that finite limits exist it suffices to show
that finite products and equalizers exist, see
Categories, Lemma \ref{categories-lemma-finite-limits-exist}.
Finite products exist
by definition and the equalizer of $a, b : x \to y$ is
the kernel of $a - b$. The argument for finite colimits
is similar but dual to this.
\end{proof}

\begin{example}
\label{example-fibre-product-pushouts}
Let $\mathcal{A}$ be an abelian category.
Pushouts and fibre products in $\mathcal{A}$ have the following
simple descriptions:
\begin{enumerate}
\item If $a : x \to y$, $b : z \to y$ are morphisms in $\mathcal{A}$, then
we have the fibre product:
$x \times_y z = \Ker((a, -b) : x \oplus z \to y)$.
\item If $a : y \to x$, $b : y \to z$ are morphisms in $\mathcal{A}$, then
we have the pushout:
$x \amalg_y z = \Coker((a, -b) : y \to x \oplus z)$.
\end{enumerate}
\end{example}

\begin{definition}
\label{definition-exact}
Let $\mathcal{A}$ be an additive category. Consider a sequence of morphisms
$$
\ldots \to x \to y \to z \to \ldots
\quad\text{or}\quad
x_1 \to x_2 \to \ldots \to x_n
$$
in $\mathcal{A}$. We say such a sequence is a {\it complex} if the
composition of any two consecutive (drawn) arrows is zero.
If $\mathcal{A}$ is abelian then we say a complex of the first
type above is {\it exact at $y$} if $\Im(x \to y) = \Ker(y \to z)$
and we say a complex of the second kind is {\it exact at $x_i$}
where $1 < i < n$ if
$\Im(x_{i - 1} \to x_i) = \Ker(x_i \to x_{i + 1})$. We a
sequence as above is {\it exact} or is an {\it exact sequence} or is an
{\it exact complex} if it is a complex and exact at every object (in
the first case) or exact at $x_i$ for all $1 < i < n$ (in the second case).
There are variants of these notions for sequences of the form
$$
\ldots \to x_{-3} \to x_{-2} \to x_{-1}
\quad\text{and}\quad
x_1 \to x_2 \to x_3 \to \ldots
$$
A {\it short exact sequence} is an exact complex of the form
$$
0 \to A  \to B \to C \to 0.
$$
\end{definition}

\noindent
In the following lemma we assume the reader knows what it means
for a sequence of abelian groups to be exact.

\begin{lemma}
\label{lemma-check-exactness}
Let $\mathcal{A}$ be an abelian category.
Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a complex of $\mathcal{A}$.
\begin{enumerate}
\item $M_1 \to M_2 \to M_3 \to 0$ is exact if and only if
$$
0 \to \Hom_\mathcal{A}(M_3, N) \to
\Hom_\mathcal{A}(M_2, N) \to \Hom_\mathcal{A}(M_1, N)
$$
is an exact sequence of abelian groups for all objects $N$ of
$\mathcal{A}$, and
\item $0 \to M_1 \to M_2 \to M_3$ is exact if and only if
$$
0 \to \Hom_\mathcal{A}(N, M_1) \to \Hom_\mathcal{A}(N, M_2) \to
\Hom_\mathcal{A}(N, M_3)
$$
is an exact sequence of abelian groups for all objects $N$ of $\mathcal{A}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: See
Algebra, Lemma \ref{algebra-lemma-hom-exact}.
\end{proof}

\begin{definition}
\label{definition-ses-split}
Let $\mathcal{A}$ be an abelian category.
Let $i : A \to B$ and $q : B \to C$ be morphisms
of $\mathcal{A}$ such that
$0 \to A \to B \to C \to 0$ is a short
exact sequence. We say the short exact
sequence is {\it split} if there exist
morphisms $j : C \to B$ and $p : B \to A$ such
that $(B, i, j, p, q)$ is the direct sum of $A$ and $C$.
\end{definition}

\begin{lemma}
\label{lemma-ses-split}
Let $\mathcal{A}$ be an abelian category.
Let $0 \to A \to B \to C \to 0$
be a short exact sequence.
\begin{enumerate}
\item Given a morphism $s : C \to B$ right inverse to
$B \to C$, there exists a unique $\pi : B \to A$
such that $(s, \pi)$ splits the short exact sequence
as in Definition \ref{definition-ses-split}.
\item Given a morphism $\pi : B \to A$ left inverse to
$A \to B$, there exists a unique $s : C \to B$
such that $(s, \pi)$ splits the short exact sequence
as in Definition \ref{definition-ses-split}.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-characterize-cartesian}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
w\ar[r]^f\ar[d]_g
& y\ar[d]^h\\
x\ar[r]^k
& z
}
$$
be a commutative diagram. 
\begin{enumerate}
\item The diagram is cartesian if and only if 
$$
0 \to w \xrightarrow{(g, f)} x \oplus y \xrightarrow{(k, -h)} z
$$
is exact.
\item The diagram is cocartesian if and only if 
$$
w \xrightarrow{(g, -f)} x \oplus y \xrightarrow{(k, h)} z \to 0
$$
is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $u = (g, f) : w \to x \oplus y$ and $v = (k, -h) : x \oplus y \to z$. 
Let $p : x \oplus y \to x$ and $q : x \oplus y \to y$ be the canonical 
projections. Let $i : \Ker(v) \to x \oplus y$ be the canonical 
injection. By Example \ref{example-fibre-product-pushouts}, the diagram is 
cartesian if and only if there exists an isomorphism 
$r : \Ker(v) \to w$ with $f \circ r = q \circ i$ and 
$g \circ r = p \circ i$. The sequence 
$0 \to w \overset{u} \to x \oplus y \overset{v} \to z$ is exact if and 
only if there exists an isomorphism $r : \Ker(v) \to w$ with 
$u \circ r = i$. But given $r : \Ker(v) \to w$, we have 
$f \circ r = q \circ i$ and $g \circ r = p \circ i$ if and 
only if $q \circ u \circ r= f \circ r = q \circ i$ and 
$p \circ u \circ r = g \circ r = p \circ i$, hence if and only if
$u \circ r = i$. This proves (1), and then (2) follows by duality. 
\end{proof}

\begin{lemma}
\label{lemma-cartesian-kernel}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
w\ar[r]^f\ar[d]_g
& y\ar[d]^h\\
x\ar[r]^k
& z
}
$$
be a commutative diagram.
\begin{enumerate}
\item If the diagram is cartesian, then the morphism 
$\Ker(f)\to\Ker(k)$ induced by $g$ is an isomorphism.
\item If the diagram is cocartesian, then the morphism 
$\Coker(f)\to\Coker(k)$ induced by $h$ is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Suppose the diagram is cartesian. Let 
$e:\Ker(f)\to\Ker(k)$ be induced by $g$. Let 
$i:\Ker(f)\to w$ and $j:\Ker(k)\to x$ be the canonical 
injections. There exists $t:\Ker(k)\to w$ with $f\circ t=0$ 
and $g\circ t=j$. Hence, there exists $u:\Ker(k)\to\Ker(f)$ 
with $i\circ u=t$. It follows 
$g\circ i\circ u\circ e=g\circ t\circ e=j\circ e=g\circ i$ and 
$f\circ i\circ u\circ e=0=f\circ i$, hence $i\circ u\circ e=i$. Since 
$i$ is a monomorphism this implies $u\circ e=\text{id}_{\Ker(f)}$.
Furthermore, we have $j\circ e\circ u=g\circ i\circ u=g\circ t=j$. 
Since $j$ is a monomorphism this implies $e\circ u=\text{id}_{\Ker(k)}$.
This proves (1). Now, (2) follows by duality.
\end{proof}

\begin{lemma}
\label{lemma-cartesian-cocartesian}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
w\ar[r]^f\ar[d]_g
& y\ar[d]^h\\
x\ar[r]^k
& z
}
$$
be a commutative diagram.
\begin{enumerate}
\item If the diagram is cartesian and $k$ is an epimorphism, 
then the diagram is cocartesian and $f$ is an epimorphism.
\item If the diagram is cocartesian and $g$ is a monomorphism, 
then the diagram is cartesian and $h$ is a monomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Suppose the diagram is cartesian and $k$ is an epimorphism. 
Let $u = (g, f) : w \to x \oplus y$ and let $v = (k, -h) : x \oplus y \to z$. 
As $k$ is an epimorphism, $v$ is an epimorphism, too. Therefore 
and by Lemma \ref{lemma-characterize-cartesian}, the sequence 
$0\to w\overset{u}\to x\oplus y\overset{v}\to z\to 0$ is exact. Thus, the 
diagram is cocartesian by Lemma \ref{lemma-characterize-cartesian}. Finally, 
$f$ is an epimorphism by Lemma \ref{lemma-cartesian-kernel} and 
Lemma \ref{lemma-characterize-injective}. This proves (1), and (2) 
follows by duality.
\end{proof}

\begin{lemma}
\label{lemma-epimorphism-universal-abelian-category}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item If $x \to y$ is surjective, then for every $z \to y$ the
projection $x \times_y z \to z$ is surjective.
\item If $x \to y$ is injective, then for every $x \to z$ the
morphism $z \to z \amalg_x y$ is injective.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediately from Lemma \ref{lemma-characterize-injective} and
Lemma \ref{lemma-cartesian-cocartesian}.
\end{proof}

\begin{lemma}
\label{lemma-check-exactness-fibre-product}
Let $\mathcal{A}$ be an abelian category. Let $f:x\to y$ and $g:y\to z$ 
be morphisms with $g\circ f=0$. Then, the following statements are equivalent:
\begin{enumerate}
\item The sequence $x\overset{f}\to y\overset{g}\to z$ is exact.
\item For every $h:w\to y$ with $g\circ h=0$ there exist an object $v$, 
an epimorphism $k:v\to w$ and a morphism $l:v\to x$ with $h\circ k=f\circ l$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $i:\Ker(g)\to y$ be the canonical injection. Let 
$p:x\to\Coim(f)$ be the canonical projection. Let 
$j:\Im(f)\to\Ker(g)$ be the canonical injection.

\medskip\noindent
Suppose (1) holds. Let $h:w\to y$ with $g\circ h=0$. There exists 
$c:w\to\Ker(g)$ with $i\circ c=h$. 
Let $v=x\times_{\Ker(g)}w$ with canonical projections 
$k:v\to w$ and $l:v\to x$, so that $c\circ k=j\circ p\circ l$. 
Then, $h\circ k=i\circ c\circ k=i\circ j\circ p\circ l=f\circ l$. 
As $j\circ p$ is an epimorphism by hypothesis, $k$ is an 
epimorphism by Lemma \ref{lemma-cartesian-cocartesian}. This implies (2).

\medskip\noindent
Suppose (2) holds. Then, $g\circ i=0$. So, there are an object 
$w$, an epimorphism $k:w\to\Ker(g)$ and a morphism 
$l:w\to x$ with $f\circ l=i\circ k$. It follows 
$i\circ j\circ p\circ l=f\circ l=i\circ k$. Since $i$ is a 
monomorphism we see that $j\circ p\circ l=k$ is an epimorphism. 
So, $j$ is an epimorphisms and thus an isomorphism. This implies (1).
\end{proof}

\begin{lemma}
\label{lemma-exact-kernel-sequence}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
x \ar[r]^f \ar[d]^\alpha &
y \ar[r]^g \ar[d]^\beta &
z \ar[d]^\gamma\\
u \ar[r]^k & v \ar[r]^l & w
}
$$
be a commutative diagram.
\begin{enumerate}
\item If the first row is exact and $k$ is a monomorphism, then the induced 
sequence $\Ker(\alpha) \to \Ker(\beta) \to \Ker(\gamma)$ 
is exact.
\item If the second row is exact and $g$ is an epimorphism, then the induced 
sequence
$\Coker(\alpha) \to \Coker(\beta) \to \Coker(\gamma)$ 
is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Suppose the first row is exact and $k$ is a monomorphism. Let 
$a:\Ker(\alpha)\to\Ker(\beta)$ and 
$b:\Ker(\beta)\to\Ker(\gamma)$ be the induced morphisms. 
Let $h:\Ker(\alpha)\to x$, $i:\Ker(\beta)\to y$ and 
$j:\Ker(\gamma)\to z$ be the canonical injections. As $j$ is 
a monomorphism we have $b\circ a=0$. Let $c:s\to\Ker(\beta)$ 
with $b\circ c=0$. Then, $g\circ i\circ c=j\circ b\circ c=0$. By 
Lemma \ref{lemma-check-exactness-fibre-product} there are an object $t$, an 
epimorphism $d:t\to s$ and a morphism $e:t\to x$ with 
$i\circ c\circ d=f\circ e$. Then, 
$k\circ \alpha\circ e=\beta\circ f\circ e=\beta\circ i\circ c\circ d=0$. 
As $k$ is a monomorphism we get $\alpha\circ e=0$. So, there exists 
$m:t\to\Ker(\alpha)$ with $h\circ m=e$. It follows 
$i\circ a\circ m=f\circ h\circ m=f\circ e=i\circ c\circ d$. 
As $i$ is a monomorphism we get $a\circ m=c\circ d$. Thus, 
Lemma \ref{lemma-check-exactness-fibre-product} implies (1), and then 
(2) follows by duality.
\end{proof}

\begin{lemma}
\label{lemma-snake}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
& x \ar[r]^f \ar[d]^\alpha &
y \ar[r]^g \ar[d]^\beta &
z \ar[r] \ar[d]^\gamma &
0 \\
0 \ar[r] & u \ar[r]^k & v \ar[r]^l & w
}
$$
be a commutative diagram with exact rows.
\begin{enumerate}
\item There exists a unique morphism
$\delta : \Ker(\gamma) \to \Coker(\alpha)$
such that the diagram
$$
\xymatrix{
y \ar[d]_\beta &
y \times_z \Ker(\gamma) \ar[l]_{\pi'} \ar[r]^{\pi} &
\Ker(\gamma) \ar[d]^\delta \\
v \ar[r]^{\iota'} & \Coker(\alpha) \amalg_u v &
\Coker(\alpha) \ar[l]_\iota
}
$$
commutes, where $\pi$ and $\pi'$ are the canonical projections
and $\iota$ and $\iota'$ are the canonical coprojections.
\item The induced sequence
$$
\Ker(\alpha) \xrightarrow{f'} \Ker(\beta) \xrightarrow{g'}
\Ker(\gamma) \xrightarrow{\delta} \Coker(\alpha) \xrightarrow{k'}
\Coker(\beta) \xrightarrow{l'} \Coker(\gamma)
$$
is exact. If $f$ is injective then so is $f'$, and if $l$ is
surjective then so is $l'$.
\end{enumerate}
\end{lemma}

\begin{proof}
As $\pi$ is an epimorphism and $\iota$ is a monomorphism by
Lemma \ref{lemma-cartesian-cocartesian}, uniqueness of $\delta$ is clear.
Let $p = y \times_z \Ker(\gamma)$ and $q = \Coker(\alpha) \amalg_u v$.
Let $h : \Ker(\beta) \to y$, $i : \Ker(\gamma) \to z$ and
$j : \Ker(\pi) \to p$ be the canonical injections.
Let $\pi'' : u \to \Coker(\alpha)$ be the canonical projection.
Keeping in mind Lemma \ref{lemma-cartesian-cocartesian} we get a commutative
diagram with exact rows
$$
\xymatrix{
0 \ar[r] &
\Ker(\pi) \ar[r]^j &
p \ar[r]^{\pi} \ar[d]_{\pi'} &
\Ker(\gamma) \ar[d]_i \ar[r] & 0 \\
& x \ar[r]^f \ar[d]_\alpha & y \ar[r]^g \ar[d]_\beta &
z \ar[d]_\gamma \ar[r] & 0 \\
0 \ar[r] & u \ar[r]^k \ar[d]_{\pi''} &
v \ar[r]^l \ar[d]_{\iota'} & w & \\
0 \ar[r] & \Coker(\alpha) \ar[r]^\iota & q & &
}
$$
As $l \circ \beta \circ \pi' = \gamma \circ i \circ \pi = 0$ and as the third
row of the diagram above is exact, there is an $a : p \to u$
with $k \circ a = \beta \circ \pi'$. As the upper right quadrangle of the
diagram above is cartesian, Lemma \ref{lemma-cartesian-kernel} yields an
epimorphism $b : x \to \Ker(\pi)$ with $\pi' \circ j \circ b = f$.
It follows
$k \circ a \circ j \circ b = \beta \circ \pi' \circ j \circ b =
\beta \circ f = k \circ \alpha$.
As $k$ is a monomorphism this implies $a \circ j \circ b = \alpha$. It follows
$\pi'' \circ a \circ j \circ b = \pi'' \circ \alpha = 0$. As $b$ is an
epimorphism this
implies $\pi'' \circ a \circ j = 0$. Therefore, as the top row of the diagram
above is exact, there exists
$\delta : \Ker(\gamma) \to \Coker(\alpha)$ with
$\delta \circ \pi = \pi'' \circ a$. It follows
$\iota \circ \delta \circ \pi = \iota \circ \pi'' \circ a =
\iota' \circ k \circ a = \iota' \circ \beta \circ \pi'$
as desired.

\medskip\noindent
As the upper right quadrangle in the diagram above is cartesian there
is a $c : \Ker(\beta) \to p$ with $\pi' \circ c = h$ and $\pi \circ c = g'$.
It follows
$\iota \circ \delta \circ g' = \iota \circ \delta \circ \pi \circ c =
\iota' \circ \beta \circ \pi' \circ c = \iota' \circ \beta \circ h = 0$.
As $\iota$ is a monomorphism this implies $\delta \circ g' = 0$.

\medskip\noindent
Next, let $d : r \to \Ker(\gamma)$ with $\delta \circ d = 0$. Applying
Lemma \ref{lemma-check-exactness-fibre-product} to the exact sequence
$p \xrightarrow{\pi} \Ker(\gamma) \to 0$ and $d$ yields an object $s$,
an epimorphism $m : s \to r$ and a morphism $n : s \to p$ with
$\pi \circ n = d \circ m$. As
$\pi'' \circ a \circ n = \delta \circ d \circ m = 0$,
applying Lemma \ref{lemma-check-exactness-fibre-product} to the exact sequence
$x \xrightarrow{\alpha} u \xrightarrow{p} \Coker(\alpha)$ and
$a \circ n$ yields an object $t$, an epimorphism $\varepsilon : t \to s$ and
a morphism $\zeta : t \to x$ with
$a \circ n \circ \varepsilon = \alpha \circ \zeta$.
It holds
$\beta \circ \pi' \circ n \circ \varepsilon =
k \circ \alpha \circ \zeta = \beta \circ f \circ \zeta$.
Let $\eta = \pi' \circ n \circ \varepsilon - f \circ \zeta : t \to y$. Then,
$\beta \circ \eta = 0$. It follows that there is a
$\vartheta : t \to \Ker(\beta)$ with $\eta = h \circ \vartheta$. It holds
$i \circ g' \circ \vartheta = g \circ h \circ \vartheta =
g \circ \pi' \circ n \circ \varepsilon - g \circ f \circ \zeta =
i \circ \pi \circ n \circ \varepsilon = i \circ d \circ m \circ \varepsilon$.
As $i$ is a monomorphism we get
$g' \circ \vartheta = d \circ m \circ \varepsilon$.
Thus, as $m \circ \varepsilon$ is an epimorphism,
Lemma \ref{lemma-check-exactness-fibre-product} implies that
$\Ker(\beta) \xrightarrow{g'} \Ker(\gamma) \xrightarrow{\delta} \Coker(\alpha)$
is exact. Then, the claim follows by Lemma \ref{lemma-exact-kernel-sequence}
and duality.
\end{proof}

\begin{lemma}
\label{lemma-snake-natural}
Let $\mathcal{A}$ be an abelian category. Let 
$$
\xymatrix{
& & & x\ar[ld]\ar[rr]\ar[dd]^(.4)\alpha
& & y\ar[ld]\ar[rr]\ar[dd]^(.4)\beta
& & z\ar[ld]\ar[rr]\ar[dd]^(.4)\gamma
& & 0\\
& & x'\ar[rr]\ar[dd]^(.4){\alpha'}
& & y'\ar[rr]\ar[dd]^(.4){\beta'}
& & z'\ar[rr]\ar[dd]^(.4){\gamma'}
& & 0
& \\
& 0\ar[rr]
& & u\ar[ld]\ar[rr]
& & v\ar[ld]\ar[rr]
& & w\ar[ld]
& & \\
0\ar[rr]
& & u'\ar[rr]
& & v'\ar[rr]
& & w'
& & &
}
$$
be a commutative diagram with exact rows. Then, the induced diagram
$$
\xymatrix@C=15pt{
\Ker(\alpha) \ar[r] \ar[d] &
\Ker(\beta) \ar[r] \ar[d] &
\Ker(\gamma) \ar[r]^(.45){\delta} \ar[d] &
\Coker(\alpha) \ar[r] \ar[d] &
\Coker(\beta) \ar[r] \ar[d] &
\Coker(\gamma) \ar[d] \\
\Ker(\alpha') \ar[r] &
\Ker(\beta') \ar[r] &
\Ker(\gamma') \ar[r]^(.45){\delta'} &
\Coker(\alpha') \ar[r] &
\Coker(\beta') \ar[r] &
\Coker(\gamma')
}
$$
commutes.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-four-lemma}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
w \ar[r] \ar[d]^\alpha & x \ar[r] \ar[d]^\beta & y \ar[r] \ar[d]^\gamma &
z \ar[d]^\delta \\
w' \ar[r] & x' \ar[r] & y' \ar[r] & z'
}
$$
be a commutative diagram with exact rows.
\begin{enumerate}
\item If $\alpha, \gamma$ are surjective and $\delta$ is injective, then
$\beta$ is surjective.
\item If $\beta, \delta$ are injective and $\alpha$ is surjective, then
$\gamma$ is injective.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $\alpha, \gamma$ are surjective and $\delta$ is injective.
We may replace $w'$ by $\Im(w' \to x')$, i.e., we may assume
that $w' \to x'$ is injective.
We may replace $z$ by $\Im(y \to z)$, i.e., we may assume that
$y \to z$ is surjective. Then we may apply
Lemma \ref{lemma-snake}
to
$$
\xymatrix{
& \Ker(y \to z) \ar[r] \ar[d] & y \ar[r] \ar[d] & z \ar[r] \ar[d] & 0 \\
0 \ar[r] & \Ker(y' \to z') \ar[r] & y' \ar[r] & z'
}
$$
to conclude that $\Ker(y \to z) \to \Ker(y' \to z')$ is
surjective. Finally, we apply
Lemma \ref{lemma-snake}
to
$$
\xymatrix{
& w \ar[r] \ar[d] & x \ar[r] \ar[d] & \Ker(y \to z) \ar[r] \ar[d] & 0 \\
0 \ar[r] & w' \ar[r] & x' \ar[r] & \Ker(y' \to z')
}
$$
to conclude that $x \to x'$ is surjective. This proves (1). The proof
of (2) is dual to this.
\end{proof}

\begin{lemma}
\label{lemma-five-lemma}
\begin{reference}
\cite[Lemma 4.5 page 16]{Eilenberg-Steenrod}
\end{reference}
Let $\mathcal{A}$ be an abelian category. Let
$$
\xymatrix{
v \ar[r] \ar[d]^\alpha &
w \ar[r] \ar[d]^\beta &
x \ar[r] \ar[d]^\gamma &
y \ar[r] \ar[d]^\delta &
z \ar[d]^\epsilon \\
v' \ar[r] & w' \ar[r] & x' \ar[r] & y' \ar[r] & z'
}
$$
be a commutative diagram with exact rows. If $\beta, \delta$
are isomorphisms, $\epsilon$ is injective, and $\alpha$ is surjective
then $\gamma$ is an isomorphism.
\end{lemma}

\begin{proof}
Immediate consequence of
Lemma \ref{lemma-four-lemma}.
\end{proof}








\section{Extensions}
\label{section-extensions}

\begin{definition}
\label{definition-extension}
Let $\mathcal{A}$ be an abelian category.
Let $A, B \in \Ob(\mathcal{A})$.
An {\it extension $E$ of $B$ by $A$} is a short
exact sequence
$$
0 \to A \to E \to B \to 0.
$$
A {\it morphism of extensions} between two
extensions $0 \to A \to E \to B \to 0$ and
$0 \to A \to F \to B \to 0$ means a morphism
$f : E \to F$ in $\mathcal{A}$ making the diagram
$$
\xymatrix{
0 \ar[r] &
A \ar[r] \ar[d]^{\text{id}} &
E \ar[r] \ar[d]^f &
B \ar[r] \ar[d]^{\text{id}} &
0 \\
0 \ar[r] &
A \ar[r] &
F \ar[r] &
B \ar[r] &
0
}
$$
commutative.
Thus, the extensions of $B$ by $A$ form a category.
\end{definition}

\noindent
By abuse of language we often omit mention of the
morphisms $A \to E$ and $E \to B$, although they are
definitively part of the structure of an extension.

\begin{definition}
\label{definition-ext-group}
Let $\mathcal{A}$ be an abelian category.
Let $A, B \in \Ob(\mathcal{A})$.
The set of isomorphism classes of extensions
of $B$ by $A$ is denoted
$$
\Ext_\mathcal{A}(B, A).
$$
This is called the {\it $\Ext$-group}.
\end{definition}

\noindent
This definition works, because by our conventions
$\Ob(\mathcal{A})$ is a set, and hence
$\Ext_\mathcal{A}(B, A)$ is a set.
In any of the cases of ``big'' abelian categories
listed in Categories, Remark \ref{categories-remark-big-categories}
one can check by hand that $\Ext_\mathcal{A}(B, A)$
is a set as well. Also, we will see later that this is
always the case when $\mathcal{A}$ has either enough projectives
or enough injectives. Insert future reference here.

\medskip\noindent
Actually we can turn $\Ext_\mathcal{A}(-, -)$ into a
functor
$$
\mathcal{A} \times \mathcal{A}^{opp} \longrightarrow \textit{Sets}, \quad
(A, B) \longmapsto \Ext_\mathcal{A}(B, A)
$$
as follows:
\begin{enumerate}
\item Given a morphism $B' \to B$ and an extension
$E$ of $B$ by $A$ we define $E' = E \times_B B'$.
By Lemma \ref{lemma-cartesian-kernel} we have the following
commutative diagram of short exact sequences
$$
\xymatrix{
0 \ar[r] & A \ar[r] \ar[d] & E' \ar[r] \ar[d] & B' \ar[r] \ar[d] & 0 \\
0 \ar[r] & A \ar[r] & E \ar[r] & B \ar[r] & 0
}
$$
The extension $E'$ is called the {\it pullback of $E$ via
$B' \to B$}.
\item Given a morphism $A \to A'$ and an extension
$E$ of $B$ by $A$ we define $E' = A' \amalg_A E$.
By Lemma \ref{lemma-cartesian-cocartesian}
we have the following commutative diagram
of short exact sequences
$$
\xymatrix{
0 \ar[r] & A \ar[r] \ar[d] & E \ar[r] \ar[d] & B \ar[r] \ar[d] & 0 \\
0 \ar[r] & A' \ar[r] & E' \ar[r] & B \ar[r] & 0
}
$$
The extension $E'$ is called the {\it pushout of $E$ via
$A \to A'$}.
\end{enumerate}
To see that this defines a functor as indicated above
there are several things to verify. First of all
functoriality in the variable $B$ requires that
$(E \times_B B') \times_{B'} B'' = E \times_B B''$
which is a general property of fibre products.
Dually one deals with functoriality in the
variable $A$. Finally, given $A \to A'$ and
$B' \to B$ we have to show that
$$
A' \amalg_A (E \times_B B')
\cong
(A' \amalg_A E)\times_B B'
$$
as extensions of $B'$ by $A'$. Recall that $A' \amalg_A E$
is a quotient of $A' \oplus E$.
Thus the right hand side is a quotient of
$A' \oplus E \times_B B'$, and it is straightforward to see that
the kernel is exactly what you need in order to
get the left hand side.

\medskip\noindent
Note that if $E_1$ and $E_2$ are extensions of
$B$ by $A$, then $E_1\oplus E_2$ is an extension
of $B \oplus B$ by $A\oplus A$. We
push out by the sum map $A \oplus A \to A$ and we
pull back by the diagonal map $B \to B \oplus B$ to get
an extension $E_1 + E_2$ of $B$ by $A$.
$$
\xymatrix{
0 \ar[r] &
A \oplus A \ar[r] \ar[d]_\Sigma &
E_1 \oplus E_2 \ar[r] \ar[d] &
B \oplus B \ar[r] \ar[d] &
0 \\
0 \ar[r] &
A \ar[r] &
E' \ar[r] &
B \oplus B \ar[r] &
0\\
0 \ar[r] &
A \ar[r] \ar[u] &
E_1 + E_2 \ar[r] \ar[u] &
B \ar[r] \ar[u]^\Delta &
0
}
$$
The extension $E_1 + E_2$ is called the {\it Baer sum} of the
given extensions.

\begin{lemma}
\label{lemma-baer-sum}
The construction $(E_1, E_2) \mapsto E_1 + E_2$
above defines a commutative group
law on $\Ext_\mathcal{A}(B, A)$ which is
functorial in both variables.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-six-term-sequence-ext}
Let $\mathcal{A}$ be an abelian category.
Let $0 \to M_1 \to M_2 \to M_3 \to 0$ be a short exact sequence
in $\mathcal{A}$.
\begin{enumerate}
\item There is a canonical six term exact sequence of abelian groups
$$
\xymatrix{
0 \ar[r] &
\Hom_\mathcal{A}(M_3, N) \ar[r] &
\Hom_\mathcal{A}(M_2, N) \ar[r] &
\Hom_\mathcal{A}(M_1, N) \ar[lld] \\
& \Ext_\mathcal{A}(M_3, N) \ar[r] &
\Ext_\mathcal{A}(M_2, N) \ar[r] &
\Ext_\mathcal{A}(M_1, N)
}
$$
for all objects $N$ of $\mathcal{A}$, and
\item there is a canonical six term exact sequence of abelian groups
$$
\xymatrix{
0 \ar[r] &
\Hom_\mathcal{A}(N, M_1) \ar[r] &
\Hom_\mathcal{A}(N, M_2) \ar[r] &
\Hom_\mathcal{A}(N, M_3) \ar[lld] \\
& \Ext_\mathcal{A}(N, M_1) \ar[r] &
\Ext_\mathcal{A}(N, M_2) \ar[r] &
\Ext_\mathcal{A}(N, M_3)
}
$$
for all objects $N$ of $\mathcal{A}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: The boundary maps are defined using either the pushout
or pullback of the given short exact sequence.
\end{proof}






\section{Additive functors}
\label{section-functors}

\noindent
First a completely silly lemma characterizing additive functors
between additive categories.

\begin{lemma}
\label{lemma-additive-functor}
Let $\mathcal{A}$ and $\mathcal{B}$ be additive categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be a functor.
The following are equivalent
\begin{enumerate}
\item $F$ is additive,
\item $F(A) \oplus F(B) \to F(A \oplus B)$ is an isomorphism for
all $A, B \in \mathcal{A}$, and
\item $F(A \oplus B) \to F(A) \oplus F(B)$  is an isomorphism for
all $A, B \in \mathcal{A}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Additive functors commute with direct sums by
Lemma \ref{lemma-additive-additive} hence (1)
implies (2) and (3). On the other hand (2) and (3)
are equivalent because the composition
$F(A) \oplus F(B) \to F(A \oplus B) \to F(A) \oplus F(B)$
is the identity map. Assume (2) and (3) hold.
Let $f, g : A \to B$ be maps. Then $f + g$ is equal to
the composition
$$
A \to A \oplus A \xrightarrow{\text{diag}(f, g)} B \oplus B \to B
$$
Apply the functor $F$ and consider the following diagram
$$
\xymatrix{
F(A) \ar[r] \ar[rd] &
F(A \oplus A) \ar[rr]_{F(\text{diag}(f, g))} & &
F(B \oplus B) \ar[r] \ar[d] &
F(B) \\
&
F(A) \oplus F(A) \ar[u] \ar[rr]^{\text{diag}(F(f), F(g))} & &
F(B) \oplus F(B) \ar[ru]
}
$$
We claim this is commutative. For the middle square we can verify it
separately for each of the four induced maps $F(A) \to F(B)$
where it follows from the fact that $F$ is a functor (in other words
this square commutes even if $F$ does not satisfy any properties
beyond being a functor). For the triangle on the left, we use that
$F(A \oplus A) \to F(A) \oplus F(A)$ is an isomorphism
to see that it suffice to check after composition with
this map and this check is trivial. Dually for the other triangle.
Thus going around the bottom is equal to $F(f + g)$ and we conclude.
\end{proof}

\noindent
Recall that we defined, in
Categories, Definition \ref{categories-definition-exact}
the notion of a ``right exact'', ``left exact'' and
``exact'' functor in the setting of a functor between
categories that have finite (co)limits. Thus this
applies in particular to functors between abelian
categories.

\begin{lemma}
\label{lemma-exact-functor}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be a functor.
\begin{enumerate}
\item If $F$ is either left or right exact, then it is additive.
\item $F$ is left exact if and only if
for every short exact sequence
$0 \to A \to B \to C \to 0$
the sequence $0 \to F(A) \to F(B) \to F(C)$
is exact.
\item $F$ is right exact if and only if for every short exact sequence
$0 \to A \to B \to C \to 0$
the sequence $F(A) \to F(B) \to F(C) \to 0$
is exact.
\item $F$ is exact if and only if for every short exact sequence
$0 \to A \to B \to C \to 0$
the sequence $0 \to F(A) \to F(B) \to F(C) \to 0$
is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
If $F$ is left exact, i.e., $F$ commutes with finite limits, then
$F$ sends products to products, hence $F$ preserved direct sums,
hence $F$ is additive by Lemma \ref{lemma-additive-functor}.
On the other hand, suppose that for every short exact sequence
$0 \to A \to B \to C \to 0$ the sequence $0 \to F(A) \to F(B) \to F(C)$
is exact. Let $A, B$ be two objects. Then we have a short
exact sequence
$$
0 \to A \to A \oplus B \to B \to 0
$$
see for example Lemma \ref{lemma-additive-cat-biproduct-kernel}.
By assumption, the lower row in the commutative diagram
$$
\xymatrix{
0 \ar[r] &
F(A) \ar[d] \ar[r] &
F(A) \oplus F(B) \ar[r] \ar[d] &
F(B) \ar[d] \ar[r] &
0 \\
0 \ar[r] &
F(A) \ar[r] &
F(A \oplus B) \ar[r] &
F(B)
}
$$
is exact. Hence by the snake lemma (Lemma \ref{lemma-snake})
we conclude that $F(A) \oplus F(B) \to F(A \oplus B)$ is an
isomorphism. Hence $F$ is additive in this case as well.
Thus for the rest of the proof we may assume $F$ is additive.

\medskip\noindent
Denote $f : B \to C$ a map from $B$ to $C$.
Exactness of $0 \to A \to B \to C$ just means that
$A = \Ker(f)$. Clearly the kernel of $f$ is
the equalizer of the two maps $f$ and $0$ from $B$ to $C$.
Hence if $F$ commutes with limits, then $F(\Ker(f))
= \Ker(F(f))$ which exactly means that
$0 \to F(A) \to F(B) \to F(C)$ is exact.

\medskip\noindent
Conversely, suppose that $F$ is additive and
transforms any short exact sequence $0 \to A \to B \to C \to 0$ into
an exact sequence $0 \to F(A) \to F(B) \to F(C)$.
Because it is additive it commutes with direct sums
and hence finite products in $\mathcal{A}$. To show
it commutes with finite limits it therefore
suffices to show that it commutes with
equalizers. But equalizers in an abelian category
are the same as the kernel of the difference map,
hence it suffices to show that $F$ commutes with
taking kernels. Let $f : A \to B$ be a morphism.
Factor $f$ as $A \to I \to B$ with $f' : A \to I$ surjective
and $i : I \to B$ injective. (This is possible by the
definition of an abelian category.) Then it is
clear that $\Ker(f) = \Ker(f')$. Also
$0 \to \Ker(f') \to A \to I \to 0$
and
$0 \to I \to B \to B/I \to 0$
are short exact. By the condition imposed on $F$
we see that
$0 \to F(\Ker(f')) \to F(A) \to F(I)$
and
$0 \to F(I) \to F(B) \to F(B/I)$
are exact. Hence it is also the case that
$F(\Ker(f'))$ is the kernel of the map
$F(A) \to F(B)$, and we win.

\medskip\noindent
The proof of (3) is similar to the proof of (2).
Statement (4) is a combination of (2) and (3).
\end{proof}

\begin{lemma}
\label{lemma-exact-functor-ext}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be an exact functor.
For every pair of objects $A, B$ of $\mathcal{A}$ the
functor $F$ induces an abelian group homomorphism
$$
\Ext_\mathcal{A}(B, A)
\longrightarrow
\Ext_\mathcal{B}(F(B), F(A))
$$
which maps the extension $E$ to $F(E)$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
The following lemma is used in the proof that the category of abelian
sheaves on a site is abelian, where the functor $b$ is sheafification.

\begin{lemma}
\label{lemma-adjoint-get-abelian}
Let $a : \mathcal{A} \to \mathcal{B}$ and $b : \mathcal{B} \to \mathcal{A}$
be functors. Assume that
\begin{enumerate}
\item $\mathcal{A}$, $\mathcal{B}$ are additive categories,
$a$, $b$ are additive functors, and $a$ is right adjoint to $b$,
\item $\mathcal{B}$ is abelian and $b$ is left exact, and
\item $ba \cong \text{id}_\mathcal{A}$.
\end{enumerate}
Then $\mathcal{A}$ is abelian.
\end{lemma}

\begin{proof}
As $\mathcal{B}$ is abelian we see that all finite limits and colimits
exist in $\mathcal{B}$ by Lemma \ref{lemma-colimit-abelian-category}.
Since $b$ is a left adjoint we see that $b$ is also right exact
and hence exact, see
Categories, Lemma \ref{categories-lemma-exact-adjoint}.
Let $\varphi : B_1 \to B_2$ be a morphism of $\mathcal{B}$.
In particular, if $K = \Ker(B_1 \to B_2)$, then $K$ is
the equalizer of $0$ and $\varphi$ and hence
$bK$ is the equalizer of $0$ and $b\varphi$, hence
$bK$ is the kernel of $b\varphi$. Similarly, if
$Q = \Coker(B_1 \to B_2)$, then $Q$ is
the coequalizer of $0$ and $\varphi$ and hence
$bQ$ is the coequalizer of $0$ and $b\varphi$, hence
$bQ$ is the cokernel of $b\varphi$. Thus we see that every morphism
of the form $b\varphi$ in $\mathcal{A}$ has a kernel and a cokernel.
However, since $ba \cong \text{id}$ we see that every morphism of
$\mathcal{A}$ is of this form, and we conclude that kernels and
cokernels exist in $\mathcal{A}$. In fact, the argument shows that
if $\psi : A_1 \to A_2$ is a morphism then
$$
\Ker(\psi) = b\Ker(a\psi),
\quad\text{and}\quad
\Coker(\psi) = b\Coker(a\psi).
$$
Now we still have to show that $\Coim(\psi)= \Im(\psi)$.
We do this as follows.
First note that since $\mathcal{A}$ has kernels and cokernels it
has all finite limits and colimits (see proof of
Lemma \ref{lemma-colimit-abelian-category}).
Hence we see by Categories, Lemma \ref{categories-lemma-exact-adjoint}
that $a$ is left exact and
hence transforms kernels (=equalizers) into kernels.
\begin{align*}
\Coim(\psi)
& =
\Coker(\Ker(\psi) \to A_1)
& \text{by definition} \\
& =
b\Coker(a(\Ker(\psi) \to A_1))
& \text{by formula above} \\
& =
b\Coker(\Ker(a\psi) \to aA_1))
& a\text{ preserves kernels} \\
& =
b\Coim(a\psi)
& \text{by definition} \\
& =
b\Im(a\psi)
& \mathcal{B}\text{ is abelian} \\
& =
b\Ker(aA_2 \to \Coker(a\psi))
& \text{by definition} \\
& =
\Ker(baA_2 \to b\Coker(a\psi))
& b\text{ preserves kernels} \\
& =
\Ker(A_2 \to b\Coker(a\psi))
& ba = \text{id}_\mathcal{A} \\
& =
\Ker(A_2 \to \Coker(\psi))
& \text{by formula above} \\
& =
\Im(\psi)
& \text{by definition}
\end{align*}
Thus the lemma holds.
\end{proof}




\section{Localization}
\label{section-localization}

\noindent
In this section we note how Gabriel-Zisman localization interacts with
the additive structure on a category.

\begin{lemma}
\label{lemma-localization-preadditive}
Let $\mathcal{C}$ be a preadditive category.
Let $S$ be a left or right multiplicative system.
There exists a unique preadditive structure on
$S^{-1}\mathcal{C}$ such that the localization functor
$Q : \mathcal{C} \to S^{-1}\mathcal{C}$ is additive.
\end{lemma}

\begin{proof}
We will prove this in the case $S$ is a left multiplicative system.
The case where $S$ is a right multiplicative system is dual.
Suppose that $X, Y$ are objects of $\mathcal{C}$ and that
$\alpha, \beta : X \to Y$ are morphisms in $S^{-1}\mathcal{C}$. According to
Categories, Lemma \ref{categories-lemma-morphisms-left-localization}
we may represent these by pairs $s^{-1}f, s^{-1}g$ with common denominator $s$.
Suppose that we have a pre-additive structure on $S^{-1}\mathcal{C}$ and
that $Q$ is additive. Then
\begin{align*}
s^{-1}f+s^{-1}g
&=Q(s)^{-1}\circ Q(f)+Q(s)^{-1}\circ Q(g)\\
&=Q(s)^{-1}\circ(Q(f)+Q(g))\\
&=Q(s)^{-1}\circ Q(f+g)\\
&=s^{-1}(f+g).
\end{align*}
Hence, the pre-additive structure on $S^{-1}\mathcal{C}$ is unique if it
exists. Correspondingly, we define $\alpha + \beta$ to be the
equivalence class of $s^{-1}(f + g)$ and in the rest of the proof we show
that this is well defined and that composition is bilinear.
Once this is done it is clear that $Q$ is an additive functor.

\medskip\noindent
Let us show construction above is well defined.
An abstract way of saying this is that filtered colimits of
abelian groups agree with filtered colimits of sets and to use
Categories,
Equation (\ref{categories-equation-left-localization-morphisms-colimit}).
We can work this out in a bit more detail as follows.
Say $s : Y \to Y_1$ and $f, g : X \to Y_1$. Suppose we have a second
representation of $\alpha, \beta$ as $(s')^{-1}f', (s')^{-1}g'$ with
$s' : Y \to Y_2$ and $f', g' : X \to Y_2$. By
Categories, Remark \ref{categories-remark-left-localization-morphisms-colimit}
we can find a morphism $s_3 : Y \to Y_3$ and morphisms
$a_1 : Y_1 \to Y_3$, $a_2 : Y_2 \to Y_3$ such that
$a_1 \circ s = s_3 = a_2 \circ s'$ and also
$a_1 \circ f = a_2 \circ f'$ and $a_1 \circ g = a_2 \circ g'$.
Hence we see that $s^{-1}(f + g)$ is equivalent to
\begin{align*}
s_3^{-1}(a_1 \circ (f + g)) & =
s_3^{-1}(a_1 \circ f + a_1 \circ g) \\
& = s_3^{-1}(a_2 \circ f' + a_2 \circ g') \\
& = s_3^{-1}(a_2 \circ (f' + g'))
\end{align*}
which is equivalent to $(s')^{-1}(f' + g')$.

\medskip\noindent
Fix $s : Y \to Y'$ and $f, g : X \to Y'$ with
$\alpha = s^{-1}f$ and $\beta = s^{-1}g$ as morphisms $X \to Y$
in $S^{-1}\mathcal{C}$.
To show that composition is bilinear first consider the case of a
morphism $\gamma : Y \to Z$ in $S^{-1}\mathcal{C}$. Say $\gamma = t^{-1}h$
for some $h : Y \to Z'$ and $t : Z \to Z'$ in $S$. Using LMS2 we
choose morphisms $a : Y' \to Z''$ and $t' : Z' \to Z''$ in $S$ such
that $a \circ s = t' \circ h$. Picture
$$
\xymatrix{
& & Z \ar[d]^t \\
& Y \ar[r]^h \ar[d]^s & Z' \ar[d]^{t'} \\
X \ar[r]^{f, g} & Y' \ar[r]^a & Z''
}
$$
Then
$\gamma \circ \alpha = (t' \circ t)^{-1}(a \circ f)$ and
$\gamma \circ \beta = (t' \circ t)^{-1}(a \circ g)$.
Hence we see that $\gamma \circ (\alpha + \beta)$ is represented
by $(t' \circ t)^{-1}(a \circ (f + g)) =
(t' \circ t)^{-1}(a \circ f + a \circ g)$ which represents
$\gamma \circ \alpha + \gamma \circ \beta$.

\medskip\noindent
Finally, assume that $\delta : W \to X$ is another morphism of
$S^{-1}\mathcal{C}$. Say $\delta = r^{-1}i$ for some
$i : W \to X'$ and $r : X \to X'$ in $S$. We claim that we can find
a morphism $s' : Y' \to Y''$ in $S$ and morphisms $a'', b'' : X' \to Y''$
such that the following diagram commutes
$$
\xymatrix{
& & & Y \ar[d]^s \\
& X \ar[rr]^{f, g, f + g} \ar[d]^r & & Y' \ar[d]^{s'} \\
W \ar[r]^i & X' \ar[rr]^{a'', b'', a'' + b''} & & Y''
}
$$
Namely, using LMS2 we can first choose
$s_1 : Y' \to Y_1$, $s_2 : Y' \to Y_2$ in $S$ and
$a : X' \to Y_1$, $b : X' \to Y_2$ such that
$a \circ r = s_1 \circ f$ and $b \circ r = s_2 \circ f$.
Then using that the category $Y'/S$ is filtered (see
Categories, Remark \ref{categories-remark-left-localization-morphisms-colimit}),
we can
find a $s' : Y' \to Y''$ and morphisms $a' : Y_1 \to Y''$, $b' : Y_2 \to Y''$
such that $s' = a' \circ s_1$ and $s' = b' \circ s_2$. Setting
$a'' = a' \circ a$ and $b'' = b' \circ b$ works.
At this point we see that the compositions
$\alpha \circ \delta$ and $\beta \circ \delta$ are represented by
$(s' \circ s)^{-1}(a'' \circ i)$ and $(s' \circ s)^{-1}(b'' \circ i)$.
Hence $\alpha \circ \delta + \beta \circ \delta$ is represented
by $(s' \circ s)^{-1}(a'' \circ i + b'' \circ i) =
(s' \circ s)^{-1}((a'' + b'') \circ i)$
which by the diagram again is a representative
of $(\alpha + \beta) \circ \delta$.
\end{proof}

\begin{lemma}
\label{lemma-localization-additive}
Let $\mathcal{C}$ be an additive category.
Let $S$ be a left or right multiplicative system.
Then $S^{-1}\mathcal{C}$ is an additive category and the localization functor
$Q : \mathcal{C} \to S^{-1}\mathcal{C}$ is additive.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-localization-preadditive}
we see that $S^{-1}\mathcal{C}$ is preadditive and that $Q$ is additive.
By Lemma \ref{lemma-additive-additive} we conclude that $S^{-1}\mathcal{C}$
has a zero object and direct sums.
\end{proof}

\noindent
The following lemma describes the ``kernel''
of the localization functor in case we invert a multiplicative system.

\begin{lemma}
\label{lemma-kernel-localization}
Let $\mathcal{C}$ be an additive category. Let $S$ be a multiplicative
system. Let $X$ be an object
of $\mathcal{C}$. The following are equivalent
\begin{enumerate}
\item $Q(X) = 0$ in $S^{-1}\mathcal{C}$,
\item there exists $Y \in \Ob(\mathcal{C})$ such that
$0 : X \to Y$ is an element of $S$, and
\item there exists $Z \in \Ob(\mathcal{C})$ such that
$0 : Z \to X$ is an element of $S$.
\end{enumerate}
\end{lemma}

\begin{proof}
If (2) holds we see that $0 = Q(0) : Q(X) \to Q(Y)$ is an isomorphism.
In the additive category $S^{-1}\mathcal{C}$ this implies that $Q(X) = 0$.
Hence (2) $\Rightarrow$ (1). Similarly, (3) $\Rightarrow$ (1).
Suppose that $Q(X) = 0$. This implies that the morphism
$f : 0 \to X$ is transformed into an isomorphism in $S^{-1}\mathcal{C}$.
Hence by
Categories, Lemma \ref{categories-lemma-what-gets-inverted}
there exists a morphism $g : Z \to 0$ such that $fg \in S$. This proves
(1) $\Rightarrow$ (3). Similarly, (1) $\Rightarrow$ (2).
\end{proof}

\begin{lemma}
\label{lemma-localization-abelian}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item If $S$ is a left multiplicative system, then
the category $S^{-1}\mathcal{A}$ has cokernels and the functor
$Q : \mathcal{A} \to S^{-1}\mathcal{A}$ commutes with them.
\item If $S$ is a right multiplicative system, then
the category $S^{-1}\mathcal{A}$ has kernels and the functor
$Q : \mathcal{A} \to S^{-1}\mathcal{A}$ commutes with them.
\item If $S$ is a multiplicative system, then the category
$S^{-1}\mathcal{A}$ is abelian and the functor
$Q : \mathcal{A} \to S^{-1}\mathcal{A}$ is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $S$ is a left multiplicative system. Let $a : X \to Y$ be a morphism
of $S^{-1}\mathcal{A}$. Then $a = s^{-1}f$ for some $s : Y \to Y'$
in $S$ and $f : X \to Y'$. Since $Q(s)$ is an isomorphism we see that
the existence of $\Coker(a : X \to Y)$ is equivalent to the existence
of $\Coker(Q(f) : X \to Y')$. Since $\Coker(Q(f))$ is the
coequalizer of $0$ and $Q(f)$ we see that $\Coker(Q(f))$ is
represented by $Q(\Coker(f))$ by
Categories, Lemma \ref{categories-lemma-left-localization-limits}.
This proves (1).

\medskip\noindent
Part (2) is dual to part (1).

\medskip\noindent
If $S$ is a multiplicative system, then $S$ is both a left and a right
multiplicative system. Thus we see that $S^{-1}\mathcal{A}$ has
kernels and cokernels and $Q$ commutes with kernels and cokernels.
To finish the proof of (3) we have to show that $\Coim = \Im$ in
$S^{-1}\mathcal{A}$. Again using that any arrow in $S^{-1}\mathcal{A}$
is isomorphic to an arrow $Q(f)$ we see that the result follows
from the result for $\mathcal{A}$.
\end{proof}




\section{Jordan-H\"older}
\label{section-jordan-holder}

\noindent
The Jordan-H\"older lemma is Lemma \ref{lemma-jordan-holder}.
First we state some definitions.

\begin{definition}
\label{definition-simple}
Let $\mathcal{A}$ be an abelian category. An object $A$ of $\mathcal{A}$
is said to be {\it simple} if it is nonzero and the only subobjects
of $A$ are $0$ and $A$.
\end{definition}

\begin{definition}
\label{definition-Artinian}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item We say an object $A$ of $\mathcal{A}$ is {\it Artinian} if and only if
it satisfies the descending chain condition for subobjects.
\item We say $\mathcal{A}$ is {\it Artinian} if every object of
$\mathcal{A}$ is Artinian.
\end{enumerate}
\end{definition}

\begin{definition}
\label{definition-Noetherian}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item We say an object $A$ of $\mathcal{A}$ is {\it Noetherian} if and only if
it satisfies the ascending chain condition for subobjects.
\item We say $\mathcal{A}$ is {\it Noetherian} if every object of
$\mathcal{A}$ is Noetherian.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-ses-artinian}
Let $\mathcal{A}$ be an abelian category. Let $0 \to A_1 \to A_2 \to A_3 \to 0$
be a short exact sequence of $\mathcal{A}$. Then $A_2$ is Artinian
if and only if $A_1$ and $A_3$ are Artinian.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-ses-noetherian}
Let $\mathcal{A}$ be an abelian category. Let $0 \to A_1 \to A_2 \to A_3 \to 0$
be a short exact sequence of $\mathcal{A}$. Then $A_2$ is Noetherian
if and only if $A_1$ and $A_3$ are Noetherian.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-finite-length}
Let $\mathcal{A}$ be an abelian category. Let $A$ be an object
of $\mathcal{A}$. The following are equivalent
\begin{enumerate}
\item $A$ is Artinian and Noetherian, and
\item there exists a filtration
$0 \subset A_1 \subset A_2 \subset \ldots \subset A_n = A$
by subobjects such that $A_i/A_{i - 1}$ is simple for $i = 1, \ldots, n$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). If $A$ is zero, then (2) holds. If $A$ is not zero, then
there exists a smallest nonzero object $A_1 \subset A$ by the Artinian
property. Of course $A_1$ is simple. If $A_1 = A$, then we are done.
If not, then we can find $A_1 \subset A_2 \subset A$ minimal
with $A_2 \not = A_1$. Then $A_2/A_1$ is simple. Continuing in this way, we
can find a sequence $0 \subset A_1 \subset A_2 \subset \ldots $
of subobjects of $A$ such that $A_i/A_{i - 1}$ is simple. Since $A$
is Noetherian, we conclude that the process stops. Hence (2) follows.

\medskip\noindent
Assume (2). We will prove (1) by induction on $n$. If $n = 1$, then
$A$ is simple and clearly Noetherian and Artinian. If the result holds
for $n - 1$, then we use the short exact sequence
$0 \to A_{n - 1} \to A_n \to A_n/A_{n - 1} \to 0$
and Lemmas \ref{lemma-ses-artinian} and \ref{lemma-ses-noetherian}
to conclude for $n$.
\end{proof}

\begin{lemma}[Jordan-H\"older]
\label{lemma-jordan-holder}
Let $\mathcal{A}$ be an abelian category. Let $A$ be an object
of $\mathcal{A}$ satisfying the equivalent conditions of
Lemma \ref{lemma-finite-length}. Given two filtrations
$$
0 \subset A_1 \subset A_2 \subset \ldots \subset A_n = A
\quad\text{and}\quad
0 \subset B_1 \subset B_2 \subset \ldots \subset B_m = A
$$
with $S_i = A_i/A_{i - 1}$ and $T_j = B_j/B_{j - 1}$ simple objects we have
$n = m$ and there exists a permutation $\sigma$ of $\{1, \ldots, n\}$
such that $S_i \cong T_{\sigma(i)}$ for all $i \in \{1, \ldots, n\}$.
\end{lemma}

\begin{proof}
Let $j$ be the smallest index such that $A_1 \subset B_j$.
Then the map $S_1 = A_1 \to B_j/B_{j - 1} = T_j$ is an isomorphism.
Moreover, the object $A/A_1 = A_n/A_1 = B_m/A_1$
has the two filtrations
$$
0 \subset A_2/A_1 \subset A_3/A_1 \subset \ldots \subset A_n/A_1
$$
and
$$
0 \subset (B_1 + A_1)/A_1 \subset \ldots \subset
(B_{j - 1} + A_1)/A_1 = B_j/A_1 \subset B_{j + 1}/A_1
\subset \ldots \subset B_m/A_1
$$
We conclude by induction.
\end{proof}








\section{Serre subcategories}
\label{section-serre-subcategories}

\noindent
In \cite[Chapter I, Section 1]{Serre_homotopie_classes}
a notion of a ``class'' of abelian groups is defined.
This notion has been extended to abelian categories by many authors
(in slightly different ways). We will use the following variant
which is virtually identical to Serre's original definition.

\begin{definition}
\label{definition-serre-subcategory}
\begin{reference}
\cite[Condition (I) on page 259]{Serre_homotopie_classes}
\end{reference}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item A {\it Serre subcategory} of $\mathcal{A}$ is a
nonempty full subcategory $\mathcal{C}$ of $\mathcal{A}$
such that given an exact sequence\footnote{By
Definition \ref{definition-exact} this means $\Im(A \to B) = \Ker(B \to C)$.}
$$
A \to B \to C
$$
with $A, C \in \Ob(\mathcal{C})$, then also
$B \in \Ob(\mathcal{C})$.
\item A {\it weak Serre subcategory} of $\mathcal{A}$ is a nonempty
full subcategory $\mathcal{C}$ of $\mathcal{A}$ such that given an
exact sequence
$$
A_0 \to A_1 \to A_2 \to A_3 \to A_4
$$
with $A_0, A_1, A_3, A_4$ in $\mathcal{C}$, then also $A_2$ in $\mathcal{C}$.
\end{enumerate}
\end{definition}

\noindent
In some references the second notion is called a ``thick'' subcategory
and in other references the first notion is called a ``thick'' subcategory.
However, it seems that the notion of a Serre subcategory is universally
accepted to be the one defined above. Note that in both cases the category
$\mathcal{C}$ is abelian and that the inclusion functor
$\mathcal{C} \to \mathcal{A}$ is a fully faithful exact functor.
Let's characterize these types of subcategories in more detail.

\begin{lemma}
\label{lemma-characterize-serre-subcategory}
Let $\mathcal{A}$ be an abelian category.
Let $\mathcal{C}$ be a subcategory of $\mathcal{A}$.
Then $\mathcal{C}$ is a Serre subcategory if and only if
the following conditions are satisfied:
\begin{enumerate}
\item $0 \in \Ob(\mathcal{C})$,
\item $\mathcal{C}$ is a strictly full subcategory of $\mathcal{A}$,
\item any subobject or quotient of an object of $\mathcal{C}$ is an object
of $\mathcal{C}$,
\item if $A \in \Ob(\mathcal{A})$ is an extension of objects of $\mathcal{C}$
then also $A \in \Ob(\mathcal{C})$.
\end{enumerate}
Moreover, a Serre subcategory is an abelian category and
the inclusion functor is exact.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-characterize-weak-serre-subcategory}
Let $\mathcal{A}$ be an abelian category.
Let $\mathcal{C}$ be a subcategory of $\mathcal{A}$.
Then $\mathcal{C}$ is a weak Serre subcategory if and only if
the following conditions are satisfied:
\begin{enumerate}
\item $0 \in \Ob(\mathcal{C})$,
\item $\mathcal{C}$ is a strictly full subcategory of $\mathcal{A}$,
\item kernels and cokernels in $\mathcal{A}$ of morphisms
between objects of $\mathcal{C}$ are in $\mathcal{C}$,
\item if $A \in \Ob(\mathcal{A})$ is an extension of objects of $\mathcal{C}$
then also $A \in \Ob(\mathcal{C})$.
\end{enumerate}
Moreover, a weak Serre subcategory is an abelian category and
the inclusion functor is exact.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-kernel-exact-functor}
Let $\mathcal{A}$, $\mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be an exact functor.
Then the full subcategory of objects $C$ of $\mathcal{A}$
such that $F(C) = 0$ forms a Serre subcategory of $\mathcal{A}$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-kernel-category}
Let $\mathcal{A}$, $\mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be an exact functor.
Then the full subcategory of objects $C$ of $\mathcal{A}$
such that $F(C) = 0$ is called the {\it kernel of the functor $F$},
and is sometimes denoted $\Ker(F)$.
\end{definition}

\noindent
Any Serre subcategory of an abelian category is the kernel of
an exact functor. In
Examples, Section \ref{examples-section-serre-quotient-modulo-torsion-modules}
we discuss this for Serre's original example of torsion groups.

\begin{lemma}
\label{lemma-serre-subcategory-is-kernel}
Let $\mathcal{A}$ be an abelian category.
Let $\mathcal{C} \subset \mathcal{A}$ be a Serre subcategory.
There exists an abelian category $\mathcal{A}/\mathcal{C}$
and an exact functor
$$
F : \mathcal{A} \longrightarrow \mathcal{A}/\mathcal{C}
$$
which is essentially surjective and whose kernel is $\mathcal{C}$.
The category $\mathcal{A}/\mathcal{C}$ and the functor $F$ are
characterized by the following universal property: For any exact
functor $G : \mathcal{A} \to \mathcal{B}$ such that
$\mathcal{C} \subset \Ker(G)$ there exists a factorization
$G = H \circ F$ for a unique exact functor
$H : \mathcal{A}/\mathcal{C} \to \mathcal{B}$.
\end{lemma}

\begin{proof}
Consider the set of arrows of $\mathcal{A}$ defined by
the following formula
$$
S = \{f \in \text{Arrows}(\mathcal{A}) \mid
\Ker(f), \Coker(f) \in \Ob(\mathcal{C}) \}.
$$
We claim that $S$ is a multiplicative system. To prove this we have
to check MS1, MS2, MS3, see
Categories, Definition \ref{categories-definition-multiplicative-system}.

\medskip\noindent
It is clear that identities are elements of $S$. Suppose that
$f : A \to B$ and $g : B \to C$ are elements of $S$.
There are exact sequences
$$
\begin{matrix}
0 \to \Ker(f) \to \Ker(gf) \to \Ker(g) \\
\Coker(f) \to \Coker(gf) \to \Coker(g) \to 0
\end{matrix}
$$
Hence it follows that $gf \in S$. This proves MS1. (In fact, a similar
argument will show that $S$ is a saturated multiplicative system, see
Categories, Definition
\ref{categories-definition-saturated-multiplicative-system}.)

\medskip\noindent
Consider a solid diagram
$$
\xymatrix{
A \ar[d]_t \ar[r]_g & B \ar@{..>}[d]^s \\
C \ar@{..>}[r]^f & C \amalg_A B
}
$$
with $t \in S$. Set
$W = C \amalg_A B =  \Coker((t, -g) : A \to C \oplus B)$.
Then $\Ker(t) \to \Ker(s)$ is surjective and
$\Coker(t) \to \Coker(s)$ is an isomorphism. Hence
$s$ is an element of $S$. This proves LMS2 and the proof of RMS2 is dual.

\medskip\noindent
Finally, consider morphisms $f, g : B \to C$ and a morphism $s : A \to B$
in $S$ such that $f \circ s = g \circ s$. This means that
$(f - g) \circ s = 0$. In turn this means that
$I = \Im(f - g) \subset C$ is a quotient of $\Coker(s)$
hence an object of $\mathcal{C}$. Thus $t : C \to C' = C/I$ is an
element of $S$ such that $t \circ (f - g) = 0$, i.e., such that
$t \circ f = t \circ g$. This proves LMS3 and the proof of
RMS3 is dual.

\medskip\noindent
Having proved that $S$ is a multiplicative system we set
$\mathcal{A}/\mathcal{C} = S^{-1}\mathcal{A}$, and we set
$F$ equal to the localization functor $Q$. By
Lemma \ref{lemma-localization-abelian}
the category $\mathcal{A}/\mathcal{C}$ is abelian and $F$ is exact.
If $X$ is in the kernel of $F = Q$, then by
Lemma \ref{lemma-kernel-localization}
we see that $0 : X \to Z$ is an element of $S$ and hence
$X$ is an object of $\mathcal{C}$, i.e., the kernel of
$F$ is $\mathcal{C}$.
Finally, if $G$ is as in the statement of the lemma, then $G$ turns
every element of $S$ into an isomorphism. Hence we obtain the
functor $H : \mathcal{A}/\mathcal{C} \to \mathcal{B}$ from
the universal property of localization, see
Categories, Lemma \ref{categories-lemma-properties-left-localization}.
We still have to show the functor $H$ is exact.
To do this it suffices to show that $H$ commutes
with taking kernels and cokernels, see Lemma \ref{lemma-exact-functor}.
Let $A \to B$ be a morphism in $\mathcal{A}/\mathcal{C}$.
We may represent $A \to B$ as $fs^{-1}$ where $s : A' \to A$
is in $S$ and $f : A' \to B$ an arbitrary morphism of $\mathcal{A}$.
Since $F = Q$ maps $s$ to an isomorphism in the quotient category
$\mathcal{A}/\mathcal{C}$, it suffices to show that $H$ commutes with taking
kernels and cokernels of morphisms $f : A \to B$ of $\mathcal{A}$.
But here we have $H(f) = G(f)$ and the result follows
from the fact that $G$ is exact.
\end{proof}

\begin{lemma}
\label{lemma-quotient-by-kernel-exact-functor}
Let $\mathcal{A}$, $\mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be an exact functor.
Let $\mathcal{C} \subset \mathcal{A}$ be a Serre subcategory
contained in the kernel of $F$.
Then $\mathcal{C} = \Ker(F)$ if and only if the induced functor
$\overline{F} : \mathcal{A}/\mathcal{C} \to \mathcal{B}$
(Lemma \ref{lemma-serre-subcategory-is-kernel}) is faithful.
\end{lemma}

\begin{proof}
We will use the results of Lemma \ref{lemma-serre-subcategory-is-kernel}
without further mention.
The ``only if'' direction is true because the kernel of $\overline{F}$ is zero
by construction. Namely, if $f : X \to Y$ is a morphism in
$\mathcal{A}/\mathcal{C}$ such that $\overline{F}(f) = 0$, then
$\overline{F}(\Im(f)) = \Im(\overline{F}(f)) = 0$, hence $\Im(f) = 0$ by the
assumption on the kernel of $F$. Thus $f = 0$.

\medskip\noindent
For the ``if'' direction, let $X$ be an object of $\mathcal{A}$ such that $F(X)
= 0$. Then $\overline{F}(\text{id}_X) = \text{id}_{\overline{F}(X)} = 0$, thus
$\text{id}_X = 0$ in $\mathcal{A}/\mathcal{C}$ by faithfulness of
$\overline{F}$. Hence $X = 0$ in $\mathcal{A}/\mathcal{C}$, that is $X \in
\Ob(\mathcal{C})$.
\end{proof}






\section{K-groups}
\label{section-K-groups}

\noindent
A tiny bit about $K_0$ of an abelian category.

\begin{definition}
\label{definition-K-zero}
Let $\mathcal{A}$ be an abelian category.
We denote $K_0(\mathcal{A})$ the
{\it zeroth $K$-group of $\mathcal{A}$}.
It is the abelian group constructed as follows.
Take the free abelian group
on the objects of $\mathcal{A}$
and for every short exact sequence
$0 \to A \to B \to C \to 0$
impose the relation $[B] - [A] - [C] = 0$.
\end{definition}

\noindent
Another way to say this is that there is a presentation
$$
\bigoplus_{A \to B \to C\text{ ses}}
\mathbf{Z}[A \to B \to C]
\longrightarrow
\bigoplus_{A \in \Ob(\mathcal{A})}
\mathbf{Z}[A]
\longrightarrow
K_0(\mathcal{A})
\longrightarrow
0
$$
with $[A \to B \to C] \mapsto [B] - [A] - [C]$ of $K_0(\mathcal{A})$.
The short exact sequence $0 \to 0 \to 0 \to 0 \to 0$
leads to the relation $[0] = 0$ in $K_0(\mathcal{A})$.
There are no set-theoretical issues as all of our categories
are ``small'' if not mentioned otherwise.
Some examples of $K$-groups for categories of modules
over rings where computed in
Algebra, Section \ref{algebra-section-K-groups}.

\begin{lemma}
\label{lemma-exact-functor-K-groups}
Let $F : \mathcal{A} \to \mathcal{B}$ be an exact functor between
abelian categories. Then $F$ induces a homomorphism of $K$-groups
$K_0(F) : K_0(\mathcal{A}) \to K_0(\mathcal{B})$ by simply setting
$K_0(F)([A]) = [F(A)]$.
\end{lemma}

\begin{proof}
Proves itself.
\end{proof}

\noindent
Suppose we are given an object $M$ of an abelian category $\mathcal{A}$
and a complex of the form
\begin{equation}
\label{equation-cyclic-complex}
\xymatrix{
\ldots \ar[r] &
M \ar[r]^\varphi &
M \ar[r]^\psi &
M \ar[r]^\varphi &
M \ar[r] & \ldots
}
\end{equation}
In this situation we define
$$
H^0(M, \varphi, \psi) = \Ker(\psi)/\Im(\varphi)
, \quad\text{and}\quad
H^1(M, \varphi, \psi) = \Ker(\varphi)/\Im(\psi).
$$

\begin{lemma}
\label{lemma-serre-subcategory-K-groups}
Let $\mathcal{A}$ be an abelian category.
Let $\mathcal{C} \subset \mathcal{A}$ be a Serre subcategory and
set $\mathcal{B} = \mathcal{A}/\mathcal{C}$.
\begin{enumerate}
\item The exact functors $\mathcal{C} \to \mathcal{A}$ and
$\mathcal{A} \to \mathcal{B}$ induce an exact sequence
$$
K_0(\mathcal{C}) \to
K_0(\mathcal{A}) \to
K_0(\mathcal{B}) \to
0
$$
of $K$-groups, and
\item the kernel of $K_0(\mathcal{C}) \to K_0(\mathcal{A})$ is equal
to the collection of elements of the form
$$
[H^0(M, \varphi, \psi)] - [H^1(M, \varphi, \psi)]
$$
where $(M, \varphi, \psi)$ is a complex as in (\ref{equation-cyclic-complex})
with the property that it becomes exact in $\mathcal{B}$; in other words
that $H^0(M, \varphi, \psi)$ and $H^1(M, \varphi, \psi)$ are
objects of $\mathcal{C}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). It is clear that $K_0(\mathcal{A}) \to K_0(\mathcal{B})$
is surjective and that the composition $K_0(\mathcal{C}) \to
K_0(\mathcal{A}) \to K_0(\mathcal{B})$ is zero. Let $x \in K_0(\mathcal{A})$
be an element mapping to zero in $K_0(\mathcal{B})$. We can write
$x = [A] - [A']$ with $A, A'$ in $\mathcal{A}$ (fun exercise).
Denote $B, B'$ the corresponding objects of $\mathcal{B}$. The fact that
$x$ maps to zero in $K_0(\mathcal{B})$
means that there exists a finite set $I = I^+ \amalg I^{-}$,
for each $i \in I$ a short exact sequence
$$
0 \to B_i \to B'_i \to B''_i \to 0
$$
in $\mathcal{B}$ such that we have
$$
[B] - [B'] = \sum\nolimits_{i \in I^{+}} ([B'_i] - [B_i] - [B''_i])
-
\sum\nolimits_{i \in I^{-}} ([B'_i] - [B_i] - [B''_i])
$$
in the free abelian group on isomorphism classes of objects of $\mathcal{B}$.
We can rewrite this as
$$
[B]
+ \sum\nolimits_{i \in I^{+}} ([B_i] + [B''_i])
+ \sum\nolimits_{i \in I^{-}} [B'_i]
=
[B']
+ \sum\nolimits_{i \in I^{-}} ([B_i] + [B''_i])
+ \sum\nolimits_{i \in I^{+}} [B'_i].
$$
Since the right and left hand side should contain the same isomorphism classes
of objects of $\mathcal{B}$ counted with multiplicity, this means there should
be a bijection
$$
\tau :
\{B\} \amalg \{B_i, B''_i; i \in I^+\} \amalg \{B'_i; i \in I^-\}
\longrightarrow
\{B'\} \amalg \{B_i, B''_i; i \in I^-\} \amalg \{B'_i; i \in I^+\}
$$
such that $N$ and $\tau(N)$ are isomorphic in $\mathcal{B}$.
The proof of Lemmas \ref{lemma-serre-subcategory-is-kernel} and
\ref{lemma-localization-abelian} show that we choose for $i \in I$
a short exact sequence
$$
0 \to A_i \to A'_i \to A''_i \to 0
$$
in $\mathcal{A}$ such that $B_i, B'_i, B''_i$ are isomorphic to the
images of $A_i, A'_i, A''_i$ in $\mathcal{B}$. This implies that the
corresponding bijection
$$
\tau :
\{A\} \amalg \{A_i, A''_i; i \in I^+\} \amalg \{A'_i; i \in I^-\}
\longrightarrow
\{A'\} \amalg \{A_i, A''_i; i \in I^-\} \amalg \{A'_i; i \in I^+\}
$$
satisfies the property that $M$ and $\tau(M)$ are objects of $\mathcal{A}$
which become isomorphic in $\mathcal{B}$. This means $[M] - [\tau(M)]$
is in the image of $K_0(\mathcal{C}) \to K_0(\mathcal{A})$. Namely,
the isomorphism in $\mathcal{B}$ is given by a diagram
$M \leftarrow M' \rightarrow \tau(M)$ in $\mathcal{A}$ where both
$M' \to M$ and $M' \to \tau(M)$ have kernel and cokernel in $\mathcal{C}$.
Working backwards we conclude that $x = [A] - [A']$ is in the image
of $K_0(\mathcal{C}) \to K_0(\mathcal{A})$ and the proof of part (1)
is complete.

\medskip\noindent
Proof of (2). The proof is similar to the proof of (1) but slightly
more bookkeeping is involved. First we remark that any class of the type
$[H^0(M, \varphi, \psi)] - [H^1(M, \varphi, \psi)]$ is zero
in $K_0(\mathcal{A})$ by the following calculation
\begin{align*}
0 & = [M] - [M] \\
& =  [\Ker(\varphi)] + [\Im(\varphi)]
- [\Ker(\psi)] - [\Im(\psi)] \\
& =
[\Ker(\varphi)/\Im(\psi)] -
[\Ker(\psi)/\Im(\varphi)] \\
& = [H^1(M, \varphi, \psi)] - [H^0(M, \varphi, \psi)]
\end{align*}
as desired. Hence it suffices to show that any element in the kernel
of $K_0(\mathcal{C}) \to K_0(\mathcal{A})$ is of this form.

\medskip\noindent
Any element $x$ in $K_0(\mathcal{C})$ can be represented as the
difference $x = [P] - [Q]$ of two objects of $\mathcal{C}$ (fun exercise).
Suppose that this element maps to zero in $K_0(\mathcal{A})$.
This means that there exist
\begin{enumerate}
\item a finite set $I = I^{+} \amalg I^{-}$,
\item for $i \in I$ a short exact sequence $0 \to A_i \to B_i \to C_i \to 0$
in $\mathcal{A}$
\end{enumerate}
such that
$$
[P] - [Q] =
\sum\nolimits_{i \in I^{+}} ([B_i] - [A_i] - [C_i])
-
\sum\nolimits_{i \in I^{-}} ([B_i] - [A_i] - [C_i])
$$
in the free abelian group on the objects of $\mathcal{A}$.
We can rewrite this as
$$
[P]
+ \sum\nolimits_{i \in I^{+}} ([A_i] + [C_i])
+ \sum\nolimits_{i \in I^{-}} [B_i]
=
[Q]
+ \sum\nolimits_{i \in I^{-}} ([A_i] + [C_i])
+ \sum\nolimits_{i \in I^{+}} [B_i].
$$
Since the right and left hand side should contain the same objects
of $\mathcal{A}$ counted with multiplicity, this means there should be
a bijection $\tau$ between the terms which occur above. Set
$$
T^{+} =
\{p\}\ \amalg\ \{a, c\} \times I^{+}\ \amalg\ \{b\} \times I^{-}
$$
and
$$
T^{-} =
\{q\}\ \amalg\ \{a, c\} \times I^{-}\ \amalg\ \{b\} \times I^{+}.
$$
Set $T = T^{+} \amalg T^{-} = \{p, q\} \amalg \{a, b, c\} \times I$.
For $t \in T$ define
$$
O(t)
=
\left\{
\begin{matrix}
P & \text{if} & t = p \\
Q & \text{if} & t = q \\
A_i & \text{if} & t = (a, i) \\
B_i & \text{if} & t = (b, i) \\
C_i & \text{if} & t = (c, i)
\end{matrix}
\right.
$$
Hence we can view $\tau : T^{+} \to T^{-}$ as a bijection
such that $O(t) = O(\tau(t))$ for all $t \in T^{+}$.
Let $t^{-}_0 = \tau(p)$ and let $t^{+}_0 \in T^{+}$ be the
unique element such that $\tau(t^{+}_0) = q$.
Consider the object
$$
M^{+} = \bigoplus\nolimits_{t \in T^{+}} O(t)
$$
By using $\tau$ we see that it is equal to the object
$$
M^{-} = \bigoplus\nolimits_{t \in T^{-}} O(t)
$$
Consider the map
$$
\varphi : M^{+} \longrightarrow M^{-}
$$
which on the summand $O(t) = A_i$ corresponding to $t = (a, i)$, $i \in I^{+}$
uses the map $A_i \to B_i$ into the summand $O((b, i)) = B_i$ of $M^{-}$
and on the summand $O(t) = B_i$ corresponding to $(b, i)$, $i \in I^{-}$
uses the map $B_i \to C_i$ into the summand $O((c, i)) = C_i$ of $M^{-}$.
The map is zero on the summands corresponding to $p$
and $(c, i)$, $i \in I^{+}$.
Similarly, consider the map
$$
\psi : M^{-} \longrightarrow M^{+}
$$
which on the summand $O(t) = A_i$ corresponding to $t = (a, i)$, $i \in I^{-}$
uses the map $A_i \to B_i$ into the summand $O((b, i)) = B_i$ of $M^{+}$
and on the summand $O(t) = B_i$ corresponding to $(b, i)$, $i \in I^{+}$
uses the map $B_i \to C_i$ into the summand $O((c, i)) = C_i$ of $M^{+}$.
The map is zero on the summands corresponding to $q$ and
$(c, i)$, $i \in I^{-}$.

\medskip\noindent
Note that the kernel of $\varphi$ is equal to the direct sum of the
summand $P$ and the summands $O((c, i)) = C_i$, $i \in I^{+}$ and
the subobjects $A_i$ inside the summands $O((b, i)) = B_i$, $i \in I^{-}$.
The image of $\psi$ is equal to the direct sum of the
summands $O((c, i)) = C_i$, $i \in I^{+}$ and
the subobjects $A_i$ inside the summands $O((b, i)) = B_i$, $i \in I^{-}$.
In other words we see that
$$
P \cong \Ker(\varphi)/\Im(\psi).
$$
In exactly the same way we see that
$$
Q \cong \Ker(\psi)/\Im(\varphi).
$$
Since as we remarked above the existence of the bijection
$\tau$ shows that $M^{+} = M^{-}$ we see that the lemma follows.
\end{proof}






\section{Cohomological delta-functors}
\label{section-cohomological-delta-functor}

\begin{definition}
\label{definition-cohomological-delta-functor}
Let $\mathcal{A}, \mathcal{B}$ be abelian categories.
A {\it cohomological $\delta$-functor} or simply a
{\it $\delta$-functor} from $\mathcal{A}$
to $\mathcal{B}$ is given by the following data:
\begin{enumerate}
\item a collection $F^n : \mathcal{A} \to \mathcal{B}$, $n \geq 0$ of additive
functors, and
\item for every short exact sequence $0 \to A \to B \to C \to 0$
of $\mathcal{A}$
a collection $\delta_{A \to B \to C} : F^n(C) \to F^{n + 1}(A)$, $n \geq 0$
of morphisms of $\mathcal{B}$.
\end{enumerate}
These data are assumed to satisfy the following axioms
\begin{enumerate}
\item for every short exact sequence as above the sequence
$$
\xymatrix{
0 \ar[r] &
F^0(A) \ar[r] &
F^0(B) \ar[r] &
F^0(C) \ar[lld]^{\delta_{A \to B \to C}} \\
 &
F^1(A) \ar[r] &
F^1(B) \ar[r] &
F^1(C) \ar[lld]^{\delta_{A \to B \to C}} \\
 &
F^2(A) \ar[r] &
F^2(B) \ar[r] &
\ldots
}
$$
is exact, and
\item for every morphism $(A \to B \to C) \to (A' \to B' \to C')$
of short exact sequences of $\mathcal{A}$ the diagrams
$$
\xymatrix{
F^n(C) \ar[d] \ar[rr]_{\delta_{A \to B \to C}} & & F^{n + 1}(A) \ar[d] \\
F^n(C') \ar[rr]^{\delta_{A' \to B' \to C'}} & & F^{n + 1}(A')
}
$$
are commutative.
\end{enumerate}
\end{definition}

\noindent
Note that this in particular implies that $F^0$ is left exact.

\begin{definition}
\label{definition-morphism-delta-functors}
Let $\mathcal{A}, \mathcal{B}$ be abelian categories.
Let $(F^n, \delta_F)$ and $(G^n, \delta_G)$ be $\delta$-functors
from $\mathcal{A}$ to $\mathcal{B}$. A {\it morphism of $\delta$-functors
from $F$ to $G$} is a collection of
transformation of functors $t^n : F^n \to G^n$, $n \geq 0$ such
that for every short exact sequence $0 \to A \to B \to C \to 0$
of $\mathcal{A}$ the diagrams
$$
\xymatrix{
F^n(C) \ar[d]_{t^n} \ar[rr]_{\delta_{F, A \to B \to C}} &
& F^{n + 1}(A) \ar[d]^{t^{n + 1}} \\
G^n(C) \ar[rr]^{\delta_{G, A \to B \to C}} & & G^{n + 1}(A)
}
$$
are commutative.
\end{definition}

\begin{definition}
\label{definition-universal-delta-functor}
Let $\mathcal{A}, \mathcal{B}$ be abelian categories.
Let $F = (F^n, \delta_F)$ be a $\delta$-functor
from $\mathcal{A}$ to $\mathcal{B}$.
We say $F$ is a {\it universal $\delta$-functor} if and only
if for every $\delta$-functor $G = (G^n, \delta_G)$ and any
morphism of functors $t : F^0 \to G^0$ there exists
a unique morphism of $\delta$-functors $\{t^n\}_{n \geq 0} : F \to G$
such that $t = t^0$.
\end{definition}

\begin{lemma}
\label{lemma-efface-implies-universal}
Let $\mathcal{A}, \mathcal{B}$ be abelian categories.
Let $F = (F^n, \delta_F)$ be a $\delta$-functor
from $\mathcal{A}$ to $\mathcal{B}$.
Suppose that for every $n > 0$ and any $A \in \Ob(\mathcal{A})$
there exists an injective morphism $u : A \to B$ (depending on $A$ and $n$)
such that $F^n(u) : F^n(A) \to F^n(B)$ is zero. Then $F$ is a universal
$\delta$-functor.
\end{lemma}

\begin{proof}
Let $G = (G^n, \delta_G)$ be a $\delta$-functor
from $\mathcal{A}$ to $\mathcal{B}$ and let $t : F^0 \to G^0$
be a morphism of functors. We have to show there exists
a unique morphism of $\delta$-functors $\{t^n\}_{n \geq 0} : F \to G$
such that $t = t^0$. We construct $t^n$ by induction on $n$.
For $n = 0$ we set $t^0 = t$.
Suppose we have already constructed a unique sequence of
transformation of functors $t^i$ for $i \leq n$ compatible with
the maps $\delta$ in degrees $\leq n$.

\medskip\noindent
Let $A \in \Ob(\mathcal{A})$. By assumption we may choose
an embedding $u : A \to B$ such that $F^{n + 1}(u) = 0$.
Let $C = B/u(A)$. The long exact cohomology sequence for
the short exact sequence $0 \to A \to B \to C \to 0$ and the
$\delta$-functor $F$ gives that
$F^{n + 1}(A) = \Coker(F^n(B) \to F^n(C))$ by our choice of $u$.
Since we have already defined $t^n$ we can set
$$
t^{n + 1}_A : F^{n + 1}(A) \to G^{n + 1}(A)
$$
equal to the unique map such that
$$
\xymatrix{
\Coker(F^n(B) \to F^n(C)) \ar[r]_{t^n}
\ar[d]_{\delta_{F, A \to B \to C}} &
\Coker(G^n(B) \to G^n(C))
\ar[d]^{\delta_{G, A \to B \to C}} \\
F^{n + 1}(A) \ar[r]^{t^{n + 1}_A} &
G^{n + 1}(A)
}
$$
commutes. This is clearly uniquely determined by the requirements
imposed. We omit the verification that this defines a transformation
of functors.
\end{proof}

\begin{lemma}
\label{lemma-uniqueness-universal-delta-functor}
Let $\mathcal{A}, \mathcal{B}$ be abelian categories.
Let $F : \mathcal{A} \to \mathcal{B}$ be a functor.
If there exists a universal $\delta$-functor
$(F^n, \delta_F)$ from $\mathcal{A}$ to $\mathcal{B}$
with $F^0 = F$, then it is determined up to unique isomorphism
of $\delta$-functors.
\end{lemma}

\begin{proof}
Immediate from the definitions.
\end{proof}







\section{Complexes}
\label{section-complexes}

\noindent
Of course the notions of a chain complex and a cochain complex
are dual and you only have to read one of the two parts of
this section. So pick the one you like. (Actually, this doesn't
quite work right since the conventions on numbering things
are not adapted to an easy transition between chain and cochain
complexes.)

\medskip\noindent
A {\it chain complex $A_\bullet$} in an additive category $\mathcal{A}$
is a complex
$$
\ldots \to
A_{n + 1} \xrightarrow{d_{n + 1}}
A_n \xrightarrow{d_n}
A_{n - 1} \to
\ldots
$$
of $\mathcal{A}$. In other words, we are given an object $A_i$ of
$\mathcal{A}$ for all $i \in \mathbf{Z}$ and for
all $i \in \mathbf{Z}$ a morphism $d_i : A_i \to A_{i - 1}$ such that
$d_{i - 1} \circ d_i = 0$ for all $i$. A {\it morphism of chain
complexes $f : A_\bullet \to B_\bullet$} is given by a
family of morphisms $f_i : A_i \to B_i$ such that all
the diagrams
$$
\xymatrix{
A_i \ar[r]_{d_i} \ar[d]_{f_i} & A_{i - 1} \ar[d]^{f_{i - 1}} \\
B_i \ar[r]^{d_i} & B_{i - 1}
}
$$
commute. The {\it category of chain complexes of $\mathcal{A}$}
is denoted $\text{Ch}(\mathcal{A})$. The full subcategory consisting
of objects of the form
$$
\ldots \to A_2 \to A_1 \to A_0 \to 0 \to 0 \to \ldots
$$
is denoted $\text{Ch}_{\geq 0}(\mathcal{A})$.
In other words, a chain complex $A_\bullet$ belongs to
$\text{Ch}_{\geq 0}(\mathcal{A})$ if and only if
$A_i = 0$ for all $i < 0$.

\medskip\noindent
Given an additive category $\mathcal{A}$ we identify $\mathcal{A}$
with the full subcategory of $\text{Ch}(\mathcal{A})$ consisting
of chain complexes zero except in degree $0$ by the functor
$$
\mathcal{A} \longrightarrow \text{Ch}(\mathcal{A}),\quad
A \longmapsto (\ldots \to 0 \to A \to 0 \to \ldots)
$$
By abuse of notation we often denote the object on the right hand side
simply $A$. If we want to stress that we are viewing $A$ as a chain
complex we may sometimes use the notation $A[0]$, see
Section \ref{section-homotopy-shift}.

\medskip\noindent
A {\it homotopy $h$} between a pair of morphisms
of chain complexes $f, g : A_\bullet \to B_\bullet$
is a collection of morphisms $h_i : A_i \to B_{i + 1}$
such that we have
$$
f_i - g_i = d_{i + 1} \circ h_i + h_{i - 1} \circ d_i
$$
for all $i$.
Two morphisms $f, g : A_\bullet \to B_\bullet$ are
said to be {\it homotopic} if a homotopy between $f$
and $g$ exists.
Clearly, the notions of chain complex, morphism of
chain complexes, and homotopies between morphisms of chain complexes
make sense even in a preadditive category.

\begin{lemma}
\label{lemma-compose-homotopy}
\begin{slogan}
Hom functors of $\text{Ch}(\mathcal{A})$ respect the homotopy relation.
\end{slogan}
Let $\mathcal{A}$ be an additive category.
Let $f, g : B_\bullet \to C_\bullet$ be morphisms
of chain complexes. Suppose given morphisms of chain
complexes $a : A_\bullet \to B_\bullet$, and
$c : C_\bullet \to D_\bullet$.
If $\{h_i : B_i \to C_{i + 1}\}$ defines a homotopy
between $f$ and $g$, then $\{c_{i + 1} \circ h_i \circ a_i\}$
defines a homotopy between $c \circ f \circ a$ and
$c \circ g \circ a$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
In particular this means that it makes sense to define
the category of chain complexes with maps up to homotopy.
We'll return to this later.

\begin{definition}
\label{definition-homotopy-equivalent}
Let $\mathcal{A}$ be an additive category.
We say a morphism $a : A_\bullet \to B_\bullet$
is a {\it homotopy equivalence} if there exists
a morphism $b : B_\bullet \to A_\bullet$
such that there exists a homotopy between
$a \circ b$ and $\text{id}_A$
and there exists a homotopy between $b \circ a$ and $\text{id}_B$.
If there exists such a morphism between $A_\bullet$ and $B_\bullet$, then
we say that $A_\bullet$ and $B_\bullet$ are {\it homotopy equivalent}.
\end{definition}

\noindent
In other words, two complexes are homotopy equivalent if they become
isomorphic in the category of complexes up to homotopy.

\begin{lemma}
\label{lemma-cat-chain-abelian}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item The category of chain complexes in $\mathcal{A}$ is
abelian.
\item A morphism of complexes
$f : A_\bullet \to B_\bullet$ is injective
if and only if each $f_n : A_n \to B_n$ is injective.
\item A morphism of complexes
$f : A_\bullet \to B_\bullet$ is surjective
if and only if each $f_n : A_n \to B_n$ is surjective.
\item A sequence of chain complexes
$$
A_\bullet \xrightarrow{f} B_\bullet \xrightarrow{g} C_\bullet
$$
is exact at $B_\bullet$ if and only if each sequence
$$
A_i \xrightarrow{f_i} B_i \xrightarrow{g_i} C_i
$$
is exact at $B_i$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
For any $i \in \mathbf{Z}$ the $i$th {\it homology group}
of a chain complex $A_\bullet$ in an abelian category is defined by
the following formula
$$
H_i(A_\bullet) = \Ker(d_i)/\Im(d_{i + 1}).
$$
If $f : A_\bullet \to B_\bullet$ is a morphism of chain
complexes of $\mathcal{A}$ then we get an induced
morphism $H_i(f) : H_i(A_\bullet) \to H_i(B_\bullet)$
because clearly
$f_i(\Ker(d_i : A_i \to A_{i - 1})) \subset
\Ker(d_i : B_i \to B_{i - 1})$, and similarly
for $\Im(d_{i + 1})$.
Thus we obtain a functor
$$
H_i : \text{Ch}(\mathcal{A}) \longrightarrow \mathcal{A}.
$$

\begin{definition}
\label{definition-quasi-isomorphism}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item A morphism of chain complexes $f : A_\bullet \to B_\bullet$
is called a {\it quasi-isomorphism} if the induced
map $H_i(f) : H_i(A_\bullet) \to H_i(B_\bullet)$
is an isomorphism for all $i \in \mathbf{Z}$.
\item A chain complex $A_\bullet$ is called
{\it acyclic} if all of its homology objects
$H_i(A_\bullet)$ are zero.
\end{enumerate}
\end{definition}


\begin{lemma}
\label{lemma-map-homology-homotopy}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item If the maps $f, g : A_\bullet \to B_\bullet$ are
homotopic, then the induced maps $H_i(f)$ and $H_i(g)$
are equal.
\item If the map $f : A_\bullet \to B_\bullet$ is a homotopy
equivalence, then $f$ is a quasi-isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-long-exact-sequence-chain}
Let $\mathcal{A}$ be an abelian category.
Suppose that
$$
0 \to
A_\bullet \to
B_\bullet \to
C_\bullet \to
0
$$
is a short exact sequence of chain complexes of $\mathcal{A}$.
Then there is a canonical long exact homology sequence
$$
\xymatrix{
\ldots & \ldots & \ldots \ar[lld] \\
H_i(A_\bullet) \ar[r] & H_i(B_\bullet) \ar[r] & H_i(C_\bullet) \ar[lld] \\
H_{i - 1}(A_\bullet) \ar[r] &
H_{i - 1}(B_\bullet) \ar[r] &
H_{i - 1}(C_\bullet) \ar[lld] \\
\ldots & \ldots & \ldots \\
}
$$
\end{lemma}

\begin{proof}
Omitted. The maps come from the Snake Lemma \ref{lemma-snake}
applied to the diagrams
$$
\xymatrix{
&
A_i/\Im(d_{A, i + 1}) \ar[r] \ar[d]^{d_{A, i}} &
B_i/\Im(d_{B, i + 1}) \ar[r] \ar[d]^{d_{B, i}} &
C_i/\Im(d_{C, i + 1}) \ar[r] \ar[d]^{d_{C, i}} &
0 \\
0 \ar[r] &
\Ker(d_{A, i - 1}) \ar[r] &
\Ker(d_{B, i - 1}) \ar[r] &
\Ker(d_{C, i - 1}) &
}
$$
\end{proof}

\noindent
A {\it cochain complex $A^\bullet$} in an additive category $\mathcal{A}$
is a complex
$$
\ldots \to
A^{n - 1} \xrightarrow{d^{n - 1}}
A^n \xrightarrow{d^n}
A^{n + 1} \to
\ldots
$$
of $\mathcal{A}$. In other words, we are given an object $A^i$ of
$\mathcal{A}$ for all $i \in \mathbf{Z}$ and for
all $i \in \mathbf{Z}$ a morphism $d^i : A^i \to A^{i + 1}$ such that
$d^{i + 1} \circ d^i = 0$ for all $i$. A {\it morphism of cochain
complexes $f : A^\bullet \to B^\bullet$} is given by a
family of morphisms $f^i : A^i \to B^i$ such that all
the diagrams
$$
\xymatrix{
A^i \ar[r]_{d^i} \ar[d]_{f^i} & A^{i + 1} \ar[d]^{f^{i + 1}} \\
B^i \ar[r]^{d^i} & B^{i + 1}
}
$$
commute. The {\it category of cochain complexes of $\mathcal{A}$}
is denoted $\text{CoCh}(\mathcal{A})$. The full subcategory consisting
of objects of the form
$$
\ldots \to 0 \to 0 \to A^0 \to A^1 \to A^2 \to \ldots
$$
is denoted $\text{CoCh}_{\geq 0}(\mathcal{A})$.
In other words, a cochain complex $A^\bullet$ belongs to the subcategory
$\text{CoCh}_{\geq 0}(\mathcal{A})$ if and only if
$A^i = 0$ for all $i < 0$.

\medskip\noindent
Given an additive category $\mathcal{A}$ we identify $\mathcal{A}$
with the full subcategory of $\text{CoCh}(\mathcal{A})$ consisting
of cochain complexes zero except in degree $0$ by the functor
$$
\mathcal{A} \longrightarrow \text{CoCh}(\mathcal{A}),\quad
A \longmapsto (\ldots \to 0 \to A \to 0 \to \ldots)
$$
By abuse of notation we often denote the object on the right hand side
simply $A$. If we want to stress that we are viewing $A$ as a cochain
complex we may sometimes use the notation $A[0]$, see
Section \ref{section-homotopy-shift}.

\medskip\noindent
A {\it homotopy $h$} between a pair of morphisms
of cochain complexes $f, g : A^\bullet \to B^\bullet$
is a collection of morphisms $h^i : A^i \to B^{i - 1}$
such that we have
$$
f^i - g^i = d^{i - 1} \circ h^i + h^{i + 1} \circ d^i
$$
for all $i$.
Two morphisms $f, g : A^\bullet \to B^\bullet$ are
said to be {\it homotopic} if a homotopy between $f$
and $g$ exists.
Clearly, the notions of cochain complex, morphism of
cochain complexes, and homotopies between morphisms of cochain complexes
make sense even in a preadditive category.

\begin{lemma}
\label{lemma-compose-homotopy-cochain}
Let $\mathcal{A}$ be an additive category.
Let $f, g : B^\bullet \to C^\bullet$ be morphisms
of cochain complexes. Suppose given morphisms of cochain
complexes $a : A^\bullet \to B^\bullet$, and
$c : C^\bullet \to D^\bullet$.
If $\{h^i : B^i \to C^{i - 1}\}$ defines a homotopy
between $f$ and $g$, then $\{c^{i - 1} \circ h^i \circ a^i\}$
defines a homotopy between $c \circ f \circ a$ and
$c \circ g \circ a$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
In particular this means that it makes sense to define
the category of cochain complexes with maps up to homotopy.
We'll return to this later.

\begin{definition}
\label{definition-homotopy-equivalent-cochain}
Let $\mathcal{A}$ be an additive category.
We say a morphism $a : A^\bullet \to B^\bullet$
is a {\it homotopy equivalence} if there exists
a morphism $b : B^\bullet \to A^\bullet$
such that there exists a homotopy between
$a \circ b$ and $\text{id}_A$
and there exists a homotopy between $b \circ a$ and $\text{id}_B$.
If there exists such a morphism between $A^\bullet$ and $B^\bullet$, then
we say that $A^\bullet$ and $B^\bullet$ are {\it homotopy equivalent}.
\end{definition}

\noindent
In other words, two complexes are homotopy equivalent if they become
isomorphic in the category of complexes up to homotopy.

\begin{lemma}
\label{lemma-cat-cochain-abelian}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item The category of cochain complexes in $\mathcal{A}$ is
abelian.
\item A morphism of cochain complexes
$f : A^\bullet \to B^\bullet$ is injective
if and only if each $f^n : A^n \to B^n$ is injective.
\item A morphism of cochain complexes
$f : A^\bullet \to B^\bullet$ is surjective
if and only if each $f^n : A^n \to B^n$ is surjective.
\item A sequence of cochain complexes
$$
A^\bullet \xrightarrow{f} B^\bullet \xrightarrow{g} C^\bullet
$$
is exact at $B^\bullet$ if and only if each sequence
$$
A^i \xrightarrow{f^i} B^i \xrightarrow{g^i} C^i
$$
is exact at $B^i$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
For any $i \in \mathbf{Z}$ the $i$th {\it cohomology group}
of a cochain complex $A^\bullet$ is defined by
the following formula
$$
H^i(A^\bullet) = \Ker(d^i)/\Im(d^{i - 1}).
$$
If $f : A^\bullet \to B^\bullet$ is a morphism of cochain
complexes of $\mathcal{A}$ then we get an induced
morphism $H^i(f) : H^i(A^\bullet) \to H^i(B^\bullet)$
because clearly
$f^i(\Ker(d^i : A^i \to A^{i + 1})) \subset
\Ker(d^i : B^i \to B^{i + 1})$, and similarly
for $\Im(d^{i - 1})$.
Thus we obtain a functor
$$
H^i : \text{CoCh}(\mathcal{A}) \longrightarrow \mathcal{A}.
$$

\begin{definition}
\label{definition-quasi-isomorphism-cochain}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item A morphism of cochain complexes $f : A^\bullet \to B^\bullet$
of $\mathcal{A}$ is called a {\it quasi-isomorphism} if the induced
maps $H^i(f) : H^i(A^\bullet) \to H^i(B^\bullet)$
is an isomorphism for all $i \in \mathbf{Z}$.
\item A cochain complex $A^\bullet$ is called
{\it acyclic} if all of its cohomology objects
$H^i(A^\bullet)$ are zero.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-map-cohomology-homotopy-cochain}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item If the maps $f, g : A^\bullet \to B^\bullet$ are
homotopic, then the induced maps $H^i(f)$ and $H^i(g)$
are equal.
\item If $f : A^\bullet \to B^\bullet$ is a homotopy equivalence,
then $f$ is a quasi-isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-long-exact-sequence-cochain}
\begin{slogan}
Short exact sequences of complexes give rise to long exact sequences
of (co)homology.
\end{slogan}
Let $\mathcal{A}$ be an abelian category. Suppose that
$$
0 \to
A^\bullet \to
B^\bullet \to
C^\bullet \to
0
$$
is a short exact sequence of cochain complexes of $\mathcal{A}$.
Then there is a long exact cohomology sequence
$$
\xymatrix{
\ldots & \ldots & \ldots \ar[lld] \\
H^i(A^\bullet) \ar[r] &
H^i(B^\bullet) \ar[r] &
H^i(C^\bullet) \ar[lld] \\
H^{i + 1}(A^\bullet) \ar[r] &
H^{i + 1}(B^\bullet) \ar[r] &
H^{i + 1}(C^\bullet) \ar[lld] \\
\ldots & \ldots & \ldots \\
}
$$
The construction produces long exact cohomology sequences
which are functorial in the short exact
sequence and compatible with shifts as in
Definition \ref{definition-cohomology-shift}.
\end{lemma}

\begin{proof}
For the horizontal maps $H^i(A^\bullet) \to H^i(B^\bullet)$ and
$H^i(B^\bullet) \to H^i(C^\bullet)$ we use the fact that $H^i$
is a functor, see above. For the ``boundary map''
$H^i(C^\bullet) \to H^{i + 1}(A^\bullet)$ we use the map $\delta$
of the Snake Lemma \ref{lemma-snake}
applied to the diagram
$$
\xymatrix{
&
A^i/\Im(d_A^{i - 1}) \ar[r] \ar[d]^{d_A^i} &
B^i/\Im(d_B^{i - 1}) \ar[r] \ar[d]^{d_B^i} &
C^i/\Im(d_C^{i - 1}) \ar[r] \ar[d]^{d_C^i} &
0 \\
0 \ar[r] &
\Ker(d_A^{i + 1}) \ar[r] &
\Ker(d_B^{i + 1}) \ar[r] &
\Ker(d_C^{i + 1}) &
}
$$
This works as the kernel of the right vertical map is equal to
$H^i(C^\bullet)$ and the cokernel of the left vertical map is
$H^{i + 1}(A^\bullet)$. The exactness of the long sequence is
the exactnesss in part (2) of Lemma \ref{lemma-snake}.
The functoriality is Lemma \ref{lemma-snake-natural}. Compatibility
with shifts is immediate from the definitions.
\end{proof}








\section{Homotopy and the shift functor}
\label{section-homotopy-shift}

\noindent
It is an annoying feature that signs and indices
have to be part of any discussion of homological
algebra\footnote{Please let us know if you notice sign errors or
if you have improvements to our conventions.}.

\begin{definition}
\label{definition-shift}
Let $\mathcal{A}$ be an additive category.
Let $A_\bullet$ be a chain complex
with boundary maps $d_{A, n} : A_n \to A_{n - 1}$.
For any $k \in \mathbf{Z}$ we define the
{\it $k$-shifted chain complex $A[k]_\bullet$}
as follows:
\begin{enumerate}
\item we set $A[k]_n = A_{n + k}$, and
\item we set $d_{A[k], n} : A[k]_n \to A[k]_{n - 1}$
equal to $d_{A[k], n} = (-1)^k d_{A, n + k}$.
\end{enumerate}
If $f : A_\bullet \to B_\bullet$ is a morphism of
chain complexes, then we let
$f[k] : A[k]_\bullet \to B[k]_\bullet$ be the
morphism of chain complexes with
$f[k]_n = f_{k + n}$.
\end{definition}

\noindent
Of course this means we have functors
$[k] : \text{Ch}(\mathcal{A}) \to \text{Ch}(\mathcal{A})$
which mutually commute (on the nose, without
any intervening isomorphisms of functors),
such that $A[k][l]_\bullet = A[k + l]_\bullet$ and
with $[0] = \text{id}_{\text{Ch}(\mathcal{A})}$.

\medskip\noindent
Recall that we view $\mathcal{A}$ as a full subcategory of
$\text{Ch}(\mathcal{A})$, see Section \ref{section-complexes}.
Thus for any object $A$ of $\mathcal{A}$ the notation $A[k]$
refers to the unique chain complex zero in all degrees except having
$A$ in degree $-k$.

\begin{definition}
\label{definition-homology-shift}
Let $\mathcal{A}$ be an abelian category.
Let $A_\bullet$ be a chain complex
with boundary maps $d_{A, n} : A_n \to A_{n - 1}$.
For any $k \in \mathbf{Z}$ we identify
{\it $H_{i + k}(A_\bullet) \rightarrow H_i(A[k]_\bullet)$}
via the identification
$A_{i + k} = A[k]_i$.
\end{definition}

\noindent
This identification is functorial in $A_\bullet$.
Note that since no signs are involved in this
definition we actually get a compatible system
of identifications of all the homology
objects $H_{i - k}(A[k]_\bullet)$, which are
further compatible with the identifications
$A[k][l]_\bullet = A[k + l]_\bullet$ and
with $[0] = \text{id}_{\text{Ch}(\mathcal{A})}$.

\medskip\noindent
Let $\mathcal{A}$ be an additive category.
Suppose that $A_\bullet$ and $B_\bullet$ are
chain complexes, $a, b : A_\bullet \to B_\bullet$ are
morphisms of chain complexes, and $\{h_i : A_i \to B_{i + 1}\}$
is a homotopy between $a$ and $b$. Recall that this means
that
$a_i - b_i = d_{i + 1} \circ h_i + h_{i - 1} \circ d_i$.
What if $a = b$? Then we obtain the formula
$0 = d_{i + 1} \circ h_i + h_{i - 1} \circ d_i$,
in other words, $ - d_{i + 1} \circ h_i = h_{i - 1} \circ d_i$.
By definition above this means the collection $\{h_i\}$
above defines a morphism of chain complexes
$$
A_\bullet \longrightarrow B[1]_\bullet.
$$
Such a thing is the same as a morphism $A[-1]_\bullet \to B_\bullet$
by our remarks above. This proves the following lemma.

\begin{lemma}
\label{lemma-homotopy-shift}
Let $\mathcal{A}$ be an additive category.
Suppose that $A_\bullet$ and $B_\bullet$ are
chain complexes. Given any morphism of chain
complexes $a : A_\bullet \to B_\bullet$ there
is a bijection between the set of homotopies
from $a$ to $a$ and
$\Mor_{\text{Ch}(\mathcal{A})}(A_\bullet, B[1]_\bullet)$.
More generally, the set of homotopies between
$a$ and $b$ is either empty or a principal homogeneous
space under the group
$\Mor_{\text{Ch}(\mathcal{A})}(A_\bullet, B[1]_\bullet)$.
\end{lemma}

\begin{proof}
See above.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split}
Let $\mathcal{A}$ be an abelian category.
Let
$$
0 \to A_\bullet \to B_\bullet \to C_\bullet \to 0
$$
be a short exact sequence of complexes.
Suppose that $\{s_n : C_n \to B_n\}$ is a family
of morphisms which split the short exact sequences
$0 \to A_n \to B_n \to C_n \to 0$. Let
$\pi_n : B_n \to A_n$ be the associated
projections, see Lemma \ref{lemma-ses-split}.
Then the family of morphisms
$$
\pi_{n - 1} \circ d_{B, n} \circ s_n
:
C_n \to A_{n - 1}
$$
define a morphism of complexes $\delta(s) : C_\bullet \to A[-1]_\bullet$.
\end{lemma}

\begin{proof}
Denote $i : A_\bullet \to B_\bullet$ and $q : B_\bullet \to C_\bullet$
the maps of complexes in the short exact sequence. Then
$i_{n - 1} \circ \pi_{n - 1} \circ d_{B, n} \circ s_n =
d_{B, n} \circ s_n - s_{n - 1} \circ d_{C, n}$. Hence
$i_{n - 2} \circ d_{A, n - 1} \circ \pi_{n - 1} \circ d_{B, n} \circ s_n =
d_{B, n - 1} \circ (d_{B, n} \circ s_n - s_{n - 1} \circ d_{C, n}) =
- d_{B, n - 1} \circ s_{n - 1} \circ d_{C, n}$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split-long}
Notation and assumptions as in Lemma \ref{lemma-ses-termwise-split} above.
The morphism of complexes $\delta(s) : C_\bullet \to A[-1]_\bullet$
induces the maps
$$
H_i(\delta(s)) :
H_i(C_\bullet) \longrightarrow H_i(A[-1]_\bullet) = H_{i - 1}(A_\bullet)
$$
which occur in the long exact homology sequence associated
to the short exact sequence of chain complexes by
Lemma \ref{lemma-long-exact-sequence-chain}.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split-homotopy}
Notation and assumptions as in Lemma \ref{lemma-ses-termwise-split} above.
Suppose $\{s'_n : C_n \to B_n\}$ is a second choice of splittings.
Write $s'_n = s_n + i_n \circ h_n$ for some unique
morphisms $h_n : C_n \to A_n$. The family of maps
$\{h_n : C_n \to A[-1]_{n + 1}\}$ is a homotopy between
the associated morphisms
$\delta(s), \delta(s') : C_\bullet \to A[-1]_\bullet$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-shift-cochain}
Let $\mathcal{A}$ be an additive category.
Let $A^\bullet$ be a cochain complex
with boundary maps $d_A^n : A^n \to A^{n + 1}$.
For any $k \in \mathbf{Z}$ we define the
{\it $k$-shifted cochain complex $A[k]^\bullet$}
as follows:
\begin{enumerate}
\item we set $A[k]^n = A^{n + k}$, and
\item we set $d_{A[k]}^n : A[k]^n \to A[k]^{n + 1}$
equal to $d_{A[k]}^n = (-1)^k d_A^{n + k}$.
\end{enumerate}
If $f : A^\bullet \to B^\bullet$ is a morphism of
cochain complexes, then we let
$f[k] : A[k]^\bullet \to B[k]^\bullet$ be the
morphism of cochain complexes with
$f[k]^n = f^{k + n}$.
\end{definition}

\noindent
Of course this means we have functors
$[k] : \text{CoCh}(\mathcal{A}) \to \text{CoCh}(\mathcal{A})$
which mutually commute (on the nose, without
any intervening isomorphisms of functors) and
such that $A[k][l]^\bullet = A[k + l]^\bullet$ and
with $[0] = \text{id}_{\text{CoCh}(\mathcal{A})}$.

\medskip\noindent
Recall that we view $\mathcal{A}$ as a full subcategory of
$\text{CoCh}(\mathcal{A})$, see Section \ref{section-complexes}.
Thus for any object $A$ of $\mathcal{A}$ the notation $A[k]$
refers to the unique cochain complex zero in all degrees except having
$A$ in degree $-k$.

\begin{definition}
\label{definition-cohomology-shift}
Let $\mathcal{A}$ be an abelian category.
Let $A^\bullet$ be a cochain complex
with boundary maps $d_A^n : A^n \to A^{n + 1}$.
For any $k \in \mathbf{Z}$ we identify
{\it $H^{i + k}(A^\bullet) \longrightarrow H^i(A[k]^\bullet)$}
via the identification $A^{i + k} = A[k]^i$.
\end{definition}

\noindent
This identification is functorial in $A^\bullet$.
Note that since no signs are involved in this
definition we actually get a compatible system
of identifications of all the homology
objects $H^{i - k}(A[k]^\bullet)$, which are
further compatible with the identifications
$A[k][l]^\bullet = A[k + l]^\bullet$ and
with $[0] = \text{id}_{\text{CoCh}(\mathcal{A})}$.

\medskip\noindent
Let $\mathcal{A}$ be an additive category.
Suppose that $A^\bullet$ and $B^\bullet$ are
cochain complexes, $a, b : A^\bullet \to B^\bullet$ are
morphisms of cochain complexes, and $\{h^i : A^i \to B^{i - 1}\}$
is a homotopy between $a$ and $b$. Recall that this means
that
$a^i - b^i = d^{i - 1} \circ h^i + h^{i + 1} \circ d^i$.
What if $a = b$? Then we obtain the formula
$0 = d^{i - 1} \circ h^i + h^{i + 1} \circ d^i$,
in other words, $ - d^{i - 1} \circ h^i = h^{i + 1} \circ d^i$.
By definition above this means the collection $\{h^i\}$
above defines a morphism of cochain complexes
$$
A^\bullet \longrightarrow B[-1]^\bullet.
$$
Such a thing is the same as a morphism $A[1]^\bullet \to B^\bullet$
by our remarks above. This proves the following lemma.

\begin{lemma}
\label{lemma-homotopy-shift-cochain}
Let $\mathcal{A}$ be an additive category.
Suppose that $A^\bullet$ and $B^\bullet$ are
cochain complexes. Given any morphism of cochain
complexes $a : A^\bullet \to B^\bullet$ there
is a bijection between the set of homotopies
from $a$ to $a$ and
$\Mor_{\text{CoCh}(\mathcal{A})}(A^\bullet, B[-1]^\bullet)$.
More generally, the set of homotopies between
$a$ and $b$ is either empty or a principal homogeneous
space under the group
$\Mor_{\text{CoCh}(\mathcal{A})}(A^\bullet, B[-1]^\bullet)$.
\end{lemma}

\begin{proof}
See above.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split-cochain}
Let $\mathcal{A}$ be an additive category.
Let
$$
0 \to A^\bullet \to B^\bullet \to C^\bullet \to 0
$$
be a complex (!) of complexes.
Suppose that we are given splittings $B^n = A^n \oplus C^n$
compatible with the maps in the displayed sequence.
Let $s^n : C^n \to B^n$ and $\pi^n : B^n \to A^n$ be the
corresponding maps. Then the family of morphisms
$$
\pi^{n + 1} \circ d_B^n \circ s^n
:
C^n \to A^{n + 1}
$$
define a morphism of complexes $\delta : C^\bullet \to A[1]^\bullet$.
\end{lemma}

\begin{proof}
Denote $i : A^\bullet \to B^\bullet$ and $q : B^\bullet \to C^\bullet$
the maps of complexes in the short exact sequence. Then
$i^{n + 1} \circ \pi^{n + 1} \circ d_B^n \circ s^n =
d_B^n \circ s^n - s^{n + 1} \circ d_C^n$. Hence
$i^{n + 2} \circ d_A^{n + 1} \circ \pi^{n + 1} \circ d_B^n \circ s^n =
d_B^{n + 1} \circ (d_B^n \circ s^n - s^{n + 1} \circ d_C^n) =
- d_B^{n + 1} \circ s^{n + 1} \circ d_C^n$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split-long-cochain}
Notation and assumptions as in
Lemma \ref{lemma-ses-termwise-split-cochain} above.
Assume in addition that $\mathcal{A}$ is abelian.
The morphism of complexes $\delta : C^\bullet \to A[1]^\bullet$
induces the maps
$$
H^i(\delta) :
H^i(C^\bullet) \longrightarrow H^i(A[1]^\bullet) = H^{i + 1}(A^\bullet)
$$
which occur in the long exact homology sequence associated
to the short exact sequence of cochain complexes by
Lemma \ref{lemma-long-exact-sequence-cochain}.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-ses-termwise-split-homotopy-cochain}
Notation and assumptions as in
Lemma \ref{lemma-ses-termwise-split-cochain}.
Let $\alpha : A^\bullet \to B^\bullet$,
$\beta : B^\bullet \to C^\bullet$ be the given
morphisms of complexes.
Suppose $(s')^n : C^n \to B^n$ and $(\pi')^n : B^n \to A^n$
is a second choice of splittings.
Write $(s')^n = s^n + \alpha^n \circ h^n$ and
$(\pi')^n = \pi^n + g^n \circ \beta^n$ for some unique
morphisms $h^n : C^n \to A^n$ and $g^n : C^n \to A^n$. Then
\begin{enumerate}
\item $g^n = - h^n$, and
\item the family of maps $\{g^n : C^n \to A[1]^{n - 1}\}$ is a homotopy
between $\delta, \delta' : C^\bullet \to A[1]^\bullet$, more precisely
$(\delta')^n = \delta^n + g^{n + 1} \circ d_C^n + d_{A[1]}^{n - 1} \circ g^n$.
\end{enumerate}
\end{lemma}

\begin{proof}
As $(s')^n$ and $(\pi')^n$ are splittings we have $(\pi')^n \circ (s')^n = 0$.
Hence
$$
0 = ( \pi^n + g^n \circ \beta^n ) \circ ( s^n + \alpha^n \circ h^n ) =
g^n \circ \beta^n \circ s^n + \pi^n \circ \alpha^n \circ h^n =
g^n + h^n
$$
which proves (1). We compute $(\delta')^n$ as follows
$$
( \pi^{n + 1} + g^{n + 1} \circ \beta^{n + 1} )
\circ d_B^n \circ
( s^n + \alpha^n \circ h^n )
= \delta^n + g^{n + 1} \circ d_C^n + d_A^n \circ h^n
$$
Since $h^n = -g^n$ and since $d_{A[1]}^{n - 1} = -d_A^n$ we conclude that (2)
holds.
\end{proof}




\section{Truncation of complexes}
\label{section-truncations}

\noindent
Let $\mathcal{A}$ be an abelian category.
Let $A_\bullet$ be a chain complex. There
are several ways to {\it truncate} the complex $A_\bullet$.
\begin{enumerate}
\item The {\it ``stupid'' truncation $\sigma_{\leq n}$}
is the subcomplex $\sigma_{\leq n} A_\bullet$ defined
by the rule $(\sigma_{\leq n} A_\bullet)_i = 0$ if
$i > n$ and $(\sigma_{\leq n} A_\bullet)_i = A_i$ if
$i \leq n$. In a picture
$$
\xymatrix{
\sigma_{\leq n}A_\bullet \ar[d]  &
\ldots \ar[r] &
0 \ar[r] \ar[d] &
A_n \ar[r] \ar[d] &
A_{n - 1} \ar[r] \ar[d] &
\ldots \\
A_\bullet  &
\ldots \ar[r] &
A_{n + 1} \ar[r] &
A_n \ar[r] &
A_{n - 1} \ar[r] &
\ldots
}
$$
Note the property
$\sigma_{\leq n}A_\bullet / \sigma_{\leq n - 1}A_\bullet = A_n[-n]$.
\item The {\it ``stupid'' truncation $\sigma_{\geq n}$}
is the quotient complex $\sigma_{\geq n} A_\bullet$ defined
by the rule $(\sigma_{\geq n} A_\bullet)_i = A_i$ if
$i \geq n$ and $(\sigma_{\geq n} A_\bullet)_i = 0$ if
$i < n$. In a picture
$$
\xymatrix{
A_\bullet \ar[d]  &
\ldots \ar[r] &
A_{n + 1} \ar[r] \ar[d] &
A_n \ar[r] \ar[d] &
A_{n - 1} \ar[r] \ar[d] &
\ldots \\
\sigma_{\geq n}A_\bullet  &
\ldots \ar[r] &
A_{n + 1} \ar[r] &
A_n \ar[r] &
0 \ar[r] &
\ldots
}
$$
The map of complexes
$\sigma_{\geq n}A_\bullet \to \sigma_{\geq n + 1}A_\bullet$ is surjective
with kernel $A_n[-n]$.
\item The {\it canonical truncation} $\tau_{\geq n}A_\bullet$
is defined by the picture
$$
\xymatrix{
\tau_{\geq n}A_\bullet \ar[d]  &
\ldots \ar[r] &
A_{n + 1} \ar[r] \ar[d] &
\Ker(d_n) \ar[r] \ar[d] &
0 \ar[r] \ar[d] &
\ldots \\
A_\bullet  &
\ldots \ar[r] &
A_{n + 1} \ar[r] &
A_n \ar[r] &
A_{n - 1} \ar[r] &
\ldots
}
$$
Note that these complexes have the property that
$$
H_i(\tau_{\geq n}A_\bullet) =
\left\{
\begin{matrix}
H_i(A_\bullet) & \text{if} & i \geq n \\
0 & \text{if} & i < n
\end{matrix}
\right.
$$
\item The {\it canonical truncation} $\tau_{\leq n}A_\bullet$
is defined by the picture
$$
\xymatrix{
A_\bullet \ar[d]  &
\ldots \ar[r] &
A_{n + 1} \ar[r] \ar[d] &
A_n \ar[r] \ar[d] &
A_{n - 1} \ar[r] \ar[d] &
\ldots \\
\tau_{\leq n}A_\bullet  &
\ldots \ar[r] &
0 \ar[r] &
\Coker(d_{n + 1}) \ar[r] &
A_{n - 1} \ar[r] &
\ldots
}
$$
Note that these complexes have the property that
$$
H_i(\tau_{\leq n}A_\bullet) =
\left\{
\begin{matrix}
H_i(A_\bullet) & \text{if} & i \leq n \\
0 & \text{if} & i > n
\end{matrix}
\right.
$$
\end{enumerate}

\noindent
Let $\mathcal{A}$ be an abelian category.
Let $A^\bullet$ be a cochain complex. There
are four ways to truncate the complex $A^\bullet$.
\begin{enumerate}
\item The {\it ``stupid'' truncation $\sigma_{\geq n}$} is the subcomplex
$\sigma_{\geq n} A^\bullet$ defined by the rule
$(\sigma_{\geq n} A^\bullet)^i = 0$ if
$i < n$ and $(\sigma_{\geq n} A^\bullet)^i = A^i$ if
$i \geq n$. In a picture
$$
\xymatrix{
\sigma_{\geq n}A^\bullet \ar[d]  &
\ldots \ar[r] &
0 \ar[r] \ar[d] &
A^n \ar[r] \ar[d] &
A^{n + 1} \ar[r] \ar[d] &
\ldots \\
A^\bullet  &
\ldots \ar[r] &
A^{n - 1} \ar[r] &
A^n \ar[r] &
A^{n + 1} \ar[r] &
\ldots
}
$$
Note the property
$\sigma_{\geq n}A^\bullet / \sigma_{\geq n + 1}A^\bullet
= A^n[-n]$.
\item The {\it ``stupid'' truncation $\sigma_{\leq n}$}
is the quotient complex $\sigma_{\leq n} A^\bullet$ defined
by the rule $(\sigma_{\leq n} A^\bullet)^i = 0$ if
$i > n$ and $(\sigma_{\leq n} A^\bullet)^i = A^i$ if
$i \leq n$. In a picture
$$
\xymatrix{
A^\bullet \ar[d]  &
\ldots \ar[r] &
A^{n - 1} \ar[r] \ar[d] &
A^n \ar[r] \ar[d] &
A^{n + 1} \ar[r] \ar[d] &
\ldots \\
\sigma_{\leq n}A^\bullet &
\ldots \ar[r] &
A^{n - 1} \ar[r] &
A^n \ar[r] &
0 \ar[r] &
\ldots \\
}
$$
The map of complexes
$\sigma_{\leq n}A^\bullet \to \sigma_{\leq n - 1}A^\bullet$ is surjective
with kernel $A^n[-n]$.
\item The {\it canonical truncation} $\tau_{\leq n}A^\bullet$
is defined by the picture
$$
\xymatrix{
\tau_{\leq n}A^\bullet \ar[d]  &
\ldots \ar[r] &
A^{n - 1} \ar[r] \ar[d] &
\Ker(d^n) \ar[r] \ar[d] &
0 \ar[r] \ar[d] &
\ldots \\
A^\bullet  &
\ldots \ar[r] &
A^{n - 1} \ar[r] &
A^n \ar[r] &
A^{n + 1} \ar[r] &
\ldots
}
$$
Note that these complexes have the property that
$$
H^i(\tau_{\leq n}A^\bullet) =
\left\{
\begin{matrix}
H^i(A^\bullet) & \text{if} & i \leq n \\
0 & \text{if} & i > n
\end{matrix}
\right.
$$
\item The {\it canonical truncation} $\tau_{\geq n}A^\bullet$
is defined by the picture
$$
\xymatrix{
A^\bullet \ar[d] &
\ldots \ar[r] &
A^{n - 1} \ar[r] \ar[d] &
A^n \ar[r] \ar[d] &
A^{n + 1} \ar[r] \ar[d] &
\ldots \\
\tau_{\geq n}A^\bullet &
\ldots \ar[r] &
0 \ar[r] &
\Coker(d^{n - 1}) \ar[r] &
A^{n + 1} \ar[r] &
\ldots
}
$$
Note that these complexes have the property that
$$
H^i(\tau_{\geq n}A^\bullet) =
\left\{
\begin{matrix}
0 & \text{if} & i < n \\
H^i(A^\bullet) & \text{if} & i \geq n
\end{matrix}
\right.
$$
\end{enumerate}


















\section{Graded objects}
\label{section-graded}

\noindent
We make the following definition.

\begin{definition}
\label{definition-graded}
Let $\mathcal{A}$ be an additive category. The {\it category of graded
objects of $\mathcal{A}$}, denoted $\text{Gr}(\mathcal{A})$, is
the category with
\begin{enumerate}
\item objects $A = (A^i)$ are families of objects $A^i$, $i \in \mathbf{Z}$
of objects of $\mathcal{A}$, and
\item morphisms $f : A = (A^i) \to B = (B^i)$ are families of
morphisms $f^i : A^i \to B^i$ of $\mathcal{A}$.
\end{enumerate}
\end{definition}

\noindent
If $\mathcal{A}$ has countable direct sums, then we can associate to
an object $A = (A^i)$ of $\text{Gr}(\mathcal{A})$ the object
$$
A = \bigoplus\nolimits_{i \in \mathbf{Z}} A^i
$$
and set $k^iA = A^i$. In this case $\text{Gr}(\mathcal{A})$ is equivalent
to the category of pairs $(A, k)$ consisting of an object $A$ of
$\mathcal{A}$ and a direct sum decomposition
$$
A = \bigoplus\nolimits_{i \in \mathbf{Z}} k^iA
$$
by direct summands indexed by $\mathbf{Z}$ and a morphism $(A, k) \to (B, k)$
of such objects is given by a morphism $\varphi : A \to B$ of $\mathcal{A}$
such that $\varphi(k^iA) \subset k^iB$ for all $i \in \mathbf{Z}$. Whenever
our additive category $\mathcal{A}$ has countable direct sums we will
use this equivalence without further mention.

\medskip\noindent
However, with our definitions an additive or abelian category does not
necessarily have all (countable) direct sums. In this case our definition
still makes sense. For example, if $\mathcal{A} = \text{Vect}_k$ is the
category of finite dimensional vector spaces over a field $k$, then
$\text{Gr}(\text{Vect}_k)$ is the category of vector
spaces with a given gradation all of whose graded pieces are finite
dimensional, and not the category of finite dimensional vector
spaces with a given gradation.

\begin{lemma}
\label{lemma-graded}
Let $\mathcal{A}$ be an abelian category. The category of graded objects
$\text{Gr}(\mathcal{A})$ is abelian.
\end{lemma}

\begin{proof}
Let $f : A = (A^i) \to B = (B^i)$ be a morphism of graded objects
of $\mathcal{A}$ given by
morphisms $f^i : A^i \to B^i$ of $\mathcal{A}$.
Then we have $\Ker(f) = (\Ker(f^i))$ and $\Coker(f) = (\Coker(f^i))$
in the category $\text{Gr}(\mathcal{A})$.
Since we have $\Im = \Coim$ in $\mathcal{A}$
we see the same thing holds in $\text{Gr}(\mathcal{A})$.
\end{proof}

\begin{remark}[Warning]
\label{remark-direct-sums-not-exact}
There are abelian categories $\mathcal{A}$ having countable direct sums
but where countable direct sums are not exact. An example
is the opposite of the category of abelian sheaves on $\mathbf{R}$.
Namely, the category of abelian sheaves on $\mathbf{R}$ has
countable products, but countable products are not exact.
For such a category the functor $\text{Gr}(\mathcal{A}) \to \mathcal{A}$,
$(A^i) \mapsto \bigoplus A^i$
described above is not exact. It is still true that
$\text{Gr}(\mathcal{A})$ is equivalent to the category of
graded objects $(A, k)$ of $\mathcal{A}$, but the kernel in the category
of graded objects of a map $\varphi : (A, k) \to (B, k)$ is not equal to
$\Ker(\varphi)$ endowed with a direct sum decomposition, but rather it is
the direct sum of the kernels of the maps $k^iA \to k^iB$.
\end{remark}

\begin{definition}
\label{definition-graded-shift}
Let $\mathcal{A}$ be an additive category. If $A = (A^i)$ is a graded object,
then the $k$th {\it shift} $A[k]$ is the graded object with
$A[k]^i = A^{k + i}$.
\end{definition}

\noindent
If $A$ and $B$ are graded objects of $\mathcal{A}$, then we have
\begin{equation}
\label{equation-hom-into-shift}
\Hom_{\text{Gr}(\mathcal{A})}(A, B[k]) =
\Hom_{\text{Gr}(\mathcal{A})}(A[-k], B)
\end{equation}
and an element of this group is sometimes called a map of graded
objects {\it homogeneous of degree $k$}.

\medskip\noindent
Given any set $G$ we can define $G$-graded objects of $\mathcal{A}$
as the category whose objects are $A = (A^g)_{g \in G}$
families of objects parametrized by elements of $G$. Morphisms
$f : A \to B$ are defined as families of maps $f^g : A^g \to B^g$
where $g$ runs over the elements of $G$. If $G$ is an abelian group,
then we can (unambiguously) define shift functors $[g]$ on the category
of $G$-graded objects by the rule $(A[g])^{g_0} = A^{g + g_0}$.
A particular case of this type of construction is when
$G = \mathbf{Z} \times \mathbf{Z}$. In this case the objects of
the category are called {\it bigraded} objects of $\mathcal{A}$.
The $(p, q)$ component of a bigraded object $A$ is usually denoted
$A^{p, q}$. For $(a, b) \in \mathbf{Z} \times \mathbf{Z}$ we write
$A[a, b]$ in stead of $A[(a, b)]$.
A morphism $A \to A[a, b]$ is sometimes called a
{\it map of bidegree $(a, b)$}.







\section{Additive monoidal categories}
\label{section-monoidal}

\noindent
Some material about the interaction between a monoidal structure
and an additive structure on a category.

\begin{definition}
\label{definition-additive-monoidal}
An {\it additive monoidal category} is an additive category $\mathcal{A}$
endowed with a monoidal structure $\otimes, \phi$
(Categories, Definition \ref{categories-definition-monoidal-category})
such that $\otimes$ is an additive functor in each variable.
\end{definition}

\begin{lemma}
\label{lemma-additive-dual}
Let $\mathcal{A}$ be an additive monoidal category.
If $Y_i$, $i = 1, 2$ are left duals of $X_i$, $i = 1, 2$, then
$Y_1 \oplus Y_2$ is a left dual of $X_1 \oplus X_2$.
\end{lemma}

\begin{proof}
Follows from uniqueness of adjoints and
Categories, Remark \ref{categories-remark-left-dual-adjoint}.
\end{proof}

\begin{lemma}
\label{lemma-Karoubian-dual}
In a Karoubian additive monoidal category every summand
of an object which has a left dual has a left dual.
\end{lemma}

\begin{proof}
We will use Categories, Lemma \ref{categories-lemma-left-dual}
without further mention.
Let $X$ be an object which has a left dual $Y$. We have
$$
\Hom(X, X) = \Hom(\mathbf{1}, X \otimes Y) = \Hom(Y, Y)
$$
If $a : X \to X$ corresponds to $b : Y \to Y$ then $b$ is the unique
endomorphism of $Y$ such that precomposing by $a$ on
$$
\Hom(Z' \otimes X, Z) = \Hom(Z', Z \otimes Y)
$$
is the same as postcomposing by $1 \otimes b$.
Hence the bijection $\Hom(X, X) \to \Hom(Y, Y)$, $a \mapsto b$
is an isomorphism of the opposite of the algebra $\Hom(X, X)$ with
the algebra $\Hom(Y, Y)$. In particular, if $X = X_1 \oplus X_2$, then
the corresponding projectors $e_1, e_2$ are mapped to idempotents
in $\Hom(Y, Y)$. If $Y = Y_1 \oplus Y_2$ is the corresponding direct
sum decomposition of $Y$ (Section \ref{section-karoubian})
then we see that under the bijection
$\Hom(Z' \otimes X, Z) = \Hom(Z', Z \otimes Y)$
we have $\Hom(Z' \otimes X_i, Z) = \Hom(Z', Z \otimes Y_i)$
functorially as subgroups for $i = 1, 2$.
It follows that $Y_i$ is the left dual of
$X_i$ by the discussion in
Categories, Remark \ref{categories-remark-left-dual-adjoint}.
\end{proof}

\begin{example}
\label{example-graded-vector-spaces}
Let $F$ be a field. Let $\mathcal{C}$ be the category of graded
$F$-vector spaces. Given graded vector spaces $V$ and $W$ we
let $V \otimes W$ denote the graded $F$-vector space whose
degree $n$ part is
$$
(V \otimes W)^n = \bigoplus\nolimits_{n = p + q} V^p \otimes_F W^q
$$
Given a third graded vector space $U$ as associativity constraint
$\phi : U \otimes (V \otimes W) \to (U \otimes V) \otimes W$
we use the ``usual'' isomorphisms
$$
U^p \otimes_F (V^q \otimes_F W^r) \to (U^p \otimes_F V^q) \otimes_F W^r
$$
of vectors spaces. As unit we use the graded $F$-vector space $\mathbf{1}$
which has $F$ in degree $0$ and is zero in other degrees.
There are two commutativity constraints on $\mathcal{C}$
which turn $\mathcal{C}$ into a symmetric monoidal category: one involves the
intervention of signs and the other does not. We will usually
use the one that does. To be explicit, if $V$ and $W$ are graded $F$-vector
spaces we will use the isomorphism $\psi : V \otimes W \to W \otimes V$
which in degree $n$ uses
$$
V^p \otimes_F W^q \to W^q \otimes_F V^p,\quad
v \otimes w \mapsto (-1)^{pq} w \otimes v
$$
We omit the verification that this works.
\end{example}

\begin{lemma}
\label{lemma-left-dual-graded-vector-spaces}
Let $F$ be a field. Let $\mathcal{C}$ be the category of graded
$F$-vector spaces viewed as a monoidal category as in
Example \ref{example-graded-vector-spaces}. If $V$ in $\mathcal{C}$
has a left dual $W$, then $\sum_n \dim_F V^n < \infty$
and the map $\epsilon$ defines nondegenerate pairings
$W^{-n} \times V^n \to F$.
\end{lemma}

\begin{proof}
As unit we take
By Categories, Definition \ref{categories-definition-dual} we have
maps
$$
\eta : \mathbf{1} \to V \otimes W\quad
\epsilon : W \otimes V \to \mathbf{1}
$$
Since $\mathbf{1} = F$ placed in degree $0$, we
may think of $\epsilon$ as a sequence of pairings
$W^{-n} \times V^n \to F$ as in the statement of the lemma.
Choose bases $\{e_{n, i}\}_{i \in I_n}$ for $V^n$ for all $n$.
Write
$$
\eta(1) = \sum e_{n, i} \otimes w_{-n, i}
$$
for some elements $w_{-n, i} \in W^{-n}$ almost all of which are zero!
The condition that $(\epsilon \otimes 1) \circ (1 \otimes \eta)$ is the
identity on $W$ means that
$$
\sum\nolimits_{n, i} \epsilon(w, e_{n, i})w_{-n, i} = w
$$
Thus we see that $W$ is generated as a graded vector space
by the finitely many nonzero vectors $w_{-n, i}$.
The condition that $(1 \otimes \epsilon) \circ (\eta \otimes 1)$
is the identity of $V$ means that
$$
\sum\nolimits_{n, i} e_{n, i}\ \epsilon(w_{-n, i}, v) = v
$$
In particular, setting $v = e_{n, i}$ we conclude that
$\epsilon(w_{-n, i}, e_{n, i'}) = \delta_{ii'}$. Thus
we find that the statement of the lemma holds and that
$\{w_{-n, i}\}_{i \in I_n}$ is the dual basis for $W^{-n}$ to
the chosen basis for $V^n$.
\end{proof}






\section{Double complexes and associated total complexes}
\label{section-double-complexes}

\noindent
We discuss double complexes and associated total complexes.

\begin{definition}
\label{definition-double-complex}
Let $\mathcal{A}$ be an additive category.
A {\it double complex} in $\mathcal{A}$ is given
by a system $(\{A^{p, q}, d_1^{p, q}, d_2^{p, q}\}_{p, q\in \mathbf{Z}})$,
where each $A^{p, q}$ is an object of $\mathcal{A}$ and
$d_1^{p, q} : A^{p, q} \to A^{p + 1, q}$ and
$d_2^{p, q} : A^{p, q} \to A^{p, q + 1}$ are morphisms of $\mathcal{A}$
such that the following rules hold:
\begin{enumerate}
\item $d_1^{p + 1, q} \circ d_1^{p, q} = 0$
\item $d_2^{p, q + 1} \circ d_2^{p, q} = 0$
\item $d_1^{p, q + 1} \circ d_2^{p, q} = d_2^{p + 1, q} \circ d_1^{p, q}$
\end{enumerate}
for all $p, q \in \mathbf{Z}$.
\end{definition}

\noindent
This is just the cochain version of the definition.
It says that each $A^{p, \bullet}$ is a cochain complex
and that each $d_1^{p, \bullet}$ is a morphism of complexes
$A^{p, \bullet} \to A^{p + 1, \bullet}$ such that
$d_1^{p + 1, \bullet} \circ d_1^{p, \bullet} = 0$ as morphisms
of complexes. In other words a double complex can be seen as
a complex of complexes. So in the diagram
$$
\xymatrix{
\ldots &
\ldots &
\ldots &
\ldots \\
\ldots \ar[r] &
A^{p, q + 1} \ar[r]^{d_1^{p, q + 1}} \ar[u] &
A^{p + 1, q + 1} \ar[r] \ar[u] &
\ldots \\
\ldots \ar[r] &
A^{p, q} \ar[r]^{d_1^{p, q}} \ar[u]^{d_2^{p, q}} &
A^{p + 1, q} \ar[r] \ar[u]_{d_2^{p + 1, q}} &
\ldots \\
\ldots &
\ldots \ar[u] &
\ldots \ar[u] &
\ldots
}
$$
any square commutes.
Warning: In the literature one encounters a different definition
where a ``bicomplex'' or  a ``double complex'' has the property that
the squares in the diagram anti-commute.

\begin{example}
\label{example-double-complex-as-tensor-product-of}
Let $\mathcal{A}$, $\mathcal{B}$, $\mathcal{C}$ be additive categories.
Suppose that
$$
\otimes : \mathcal{A} \times \mathcal{B} \longrightarrow \mathcal{C},
\quad
(X, Y) \longmapsto X \otimes Y
$$
is a functor which is bilinear on morphisms, see
Categories, Definition \ref{categories-definition-product-category}
for the definition of $\mathcal{A} \times \mathcal{B}$.
Given complexes $X^\bullet$ of $\mathcal{A}$ and $Y^\bullet$
of $\mathcal{B}$ we obtain a double complex
$$
K^{\bullet, \bullet} = X^\bullet \otimes Y^\bullet
$$
in $\mathcal{C}$. Here the first differential
$K^{p, q} \to K^{p + 1, q}$ is the morphism
$X^p \otimes Y^q \to X^{p + 1} \otimes Y^q$ induced by
the morphism $X^p \to X^{p + 1}$ and the identity on $Y^q$.
Similarly for the second differential.
\end{example}

\begin{definition}
\label{definition-associated-simple-complex}
Let $\mathcal{A}$ be an additive category.
Let $A^{\bullet, \bullet}$ be a double complex.
The {\it associated simple complex}, denoted $sA^\bullet$, also
often called the {\it associated total complex}, denoted
$\text{Tot}(A^{\bullet, \bullet})$, is
given by
$$
sA^n = \text{Tot}^n(A^{\bullet, \bullet}) =
\bigoplus\nolimits_{n = p + q} A^{p, q}
$$
(if it exists) with differential
$$
d_{sA^\bullet}^n = d_{\text{Tot}(A^{\bullet, \bullet})}^n =
\sum\nolimits_{n = p + q} (d_1^{p, q} + (-1)^p d_2^{p, q})
$$
\end{definition}

\noindent
If countable direct sums exist in $\mathcal{A}$ or if for each $n$ at most
finitely many $A^{p, n - p}$ are nonzero, then
$\text{Tot}(A^{\bullet, \bullet})$ exists. Note that
the definition is {\it not} symmetric in the indices $(p, q)$.

\begin{remark}
\label{remark-triple-complex}
Let $\mathcal{A}$ be an additive category. Let $A^{\bullet, \bullet, \bullet}$
be a triple complex. The associated total complex is the complex with
terms
$$
\text{Tot}^n(A^{\bullet, \bullet, \bullet}) =
\bigoplus\nolimits_{p + q + r = n} A^{p, q, r}
$$
and differential
$$
d^n_{\text{Tot}(A^{\bullet, \bullet, \bullet})} =
\sum\nolimits_{p + q + r = n}
d_1^{p, q, r} + (-1)^pd_2^{p, q, r} + (-1)^{p + q}d_3^{p, q, r}
$$
With this definition a simple calculation shows that the associated total
complex is equal to
$$
\text{Tot}(A^{\bullet, \bullet, \bullet}) =
\text{Tot}(\text{Tot}_{12}(A^{\bullet, \bullet, \bullet})) =
\text{Tot}(\text{Tot}_{23}(A^{\bullet, \bullet, \bullet}))
$$
In other words, we can either first combine the first two of the variables
and then combine sum of those with the last, or we can first combine the
last two variables and then combine the first with the sum of the last two.
\end{remark}

\begin{remark}
\label{remark-shift-double-complex}
Let $\mathcal{A}$ be an additive category. Let $A^{\bullet, \bullet}$
be a double complex with differentials $d_1^{p, q}$ and $d_2^{p, q}$.
Denote $A^{\bullet, \bullet}[a, b]$ the double complex with
$$
(A^{\bullet, \bullet}[a, b])^{p, q} = A^{p + a, q + b}
$$
and differentials
$$
d_{A^{\bullet, \bullet}[a, b], 1}^{p, q} = (-1)^a d_1^{p + a, q + b}
\quad\text{and}\quad
d_{A^{\bullet, \bullet}[a, b], 2}^{p, q} = (-1)^b d_2^{p + a, q + b}
$$
In this situation there is a well defined isomorphism
$$
\gamma :
\text{Tot}(A^{\bullet, \bullet})[a + b]
\longrightarrow
\text{Tot}(A^{\bullet, \bullet}[a, b])
$$
which in degree $n$ is given by the map
$$
\xymatrix{
(\text{Tot}(A^{\bullet, \bullet})[a + b])^n =
\bigoplus_{p + q = n + a + b} A^{p, q}
\ar[d]^{\epsilon(p, q, a, b)\text{id}_{A^{p, q}}} \\
\text{Tot}(A^{\bullet, \bullet}[a, b])^n =
\bigoplus_{p' + q' = n} A^{p' + a, q' + b}
}
$$
for some sign $\epsilon(p, q, a, b)$. Of course the summand $A^{p, q}$
maps to the summand $A^{p' + a, q' + b}$ when $p = p' + a$ and $q = q' + b$.
To figure out the conditions on these signs observe that on the source we have
$$
d|_{A^{p, q}} = (-1)^{a + b}\left(d_1^{p, q} + (-1)^pd_2^{p, q}\right)
$$
whereas on the target we have
$$
d|_{A^{p' + a, q' + b}} =
(-1)^ad_1^{p' + a, q' + b} + (-1)^{p'}(-1)^bd_2^{p' + a, q' + b}
$$
Thus our constraints are that
$$
(-1)^a \epsilon(p, q, a, b) = \epsilon(p + 1, q, a, b)(-1)^{a + b}
\Leftrightarrow
\epsilon(p + 1, q, a, b) = (-1)^b \epsilon(p, q, a, b)
$$
and
$$
(-1)^{p' + b}\epsilon(p, q, a, b) =
\epsilon(p, q + 1, a, b) (-1)^{a + b + p}
\Leftrightarrow
\epsilon(p, q, a, b) = \epsilon(p, q + 1, a, b)
$$
Thus we choose $\epsilon(p, q, a, b) = (-1)^{pb}$.
\end{remark}

\begin{remark}
\label{remark-double-complex-complex-of-complexes-first}
Let $\mathcal{A}$ be an additive category with countable direct sums.
Let $\text{DoubleComp}(\mathcal{A})$ denote the category of double complexes.
We can consider an object $A^{\bullet, \bullet}$ of
$\text{DoubleComp}(\mathcal{A})$ as a complex of complexes
as follows
$$
\ldots \to A^{\bullet, -1} \to A^{\bullet, 0} \to A^{\bullet, 1} \to \ldots
$$
For the variant where we switch the role of the indices, see
Remark \ref{remark-double-complex-complex-of-complexes-second}.
In this remark we show that taking the associated total complex
is compatible with all the structures on complexes we have studied
in the chapter so far.

\medskip\noindent
First, observe that the shift functor on double complexes viewed
as complexes of complexes in the manner given above is the functor
$[0, 1]$ defined in Remark \ref{remark-shift-double-complex}.
By Remark \ref{remark-shift-double-complex} the functor
$$
\text{Tot} : \text{DoubleComp}(\mathcal{A}) \to \text{Comp}(\mathcal{A})
$$
is compatible with shift functors, in the sense that we have a functorial
isomorphism $\gamma : \text{Tot}(A^{\bullet, \bullet})[1] \to
\text{Tot}(A^{\bullet, \bullet}[0, 1])$.

\medskip\noindent
Second, if
$$
f, g : A^{\bullet, \bullet} \to B^{\bullet, \bullet}
$$
are homotopic when $f$ and $g$ are viewed as morphisms of complexes
of complexes in the manner given above, then
$$
\text{Tot}(f), \text{Tot}(g) :
\text{Tot}(A^{\bullet, \bullet}) \to \text{Tot}(B^{\bullet, \bullet})
$$
are homotopic maps of complexes. Indeed, let $h = (h^q)$
be a homotopy between $f$ and $g$. If we denote
$h^{p, q} : A^{p, q} \to B^{p, q - 1}$ the component in degree $p$ of $h^q$,
then this means that
$$
f^{p, q} - g^{p, q} = d_2^{p, q - 1} \circ h^{p, q} +
h^{p, q + 1} \circ d_2^{p, q}
$$
The fact that $h^q : A^{\bullet, q} \to B^{\bullet, q - 1}$ is a map of
complexes means that
$$
d_1^{p, q - 1} \circ h^{p, q} = h^{p + 1, q} \circ d_1^{p, q}
$$
Let us define $h' = ((h')^n)$ the homotopy given by the maps
$(h')^n : \text{Tot}^n(A^{\bullet, \bullet}) \to
\text{Tot}^{n - 1}(B^{\bullet, \bullet})$
using $(-1)^ph^{p, q}$ on the summand $A^{p, q}$ for $p + q = n$.
Then we see that
$$
d_{\text{Tot}(B^{\bullet, \bullet})} \circ h' +
h' \circ d_{\text{Tot}(A^{\bullet, \bullet})}
$$
restricted to the summand $A^{p, q}$ is equal to
$$
d_1^{p, q - 1} \circ (-1)^p h^{p, q} +
(-1)^p d_2^{p, q - 1} \circ (-1)^p h^{p, q} +
(-1)^{p + 1} h^{p + 1, q} \circ d_1^{p, q} +
(-1)^p h^{p, q + 1} \circ (-1)^p d_2^{p, q}
$$
which evaluates to $f^{p, q} - g^{p, q}$ by the equations given above.
This proves the second compatibility.

\medskip\noindent
Third, suppose that in the paragraph above we have $f = g$.
Then the assignment $h \leadsto h'$ above is compatible with
the identification of Lemma \ref{lemma-homotopy-shift-cochain}.
More precisely, if we view $h$ as a morphism of complexes
of complexes $A^{\bullet, \bullet} \to B^{\bullet, \bullet}[0, -1]$
via this lemma then
$$
\text{Tot}(A^{\bullet, \bullet})
\xrightarrow{\text{Tot}(h)}
\text{Tot}(B^{\bullet, \bullet}[0, -1])
\xrightarrow{\gamma^{-1}}
\text{Tot}(B^{\bullet, \bullet})[-1]
$$
is equal to $h'$ viewed as a morphism of complexes via the lemma.
Here $\gamma$ is the identification of
Remark \ref{remark-shift-double-complex}.
The verification of this third point is immediate.

\medskip\noindent
Fourth, let
$$
0 \to A^{\bullet, \bullet} \to B^{\bullet, \bullet} \to
C^{\bullet, \bullet} \to 0
$$
be a complex of double complexes and suppose we are given splittings
$s^q : C^{\bullet, q} \to B^{\bullet, q}$ and
$\pi^q : B^{\bullet, q} \to A^{\bullet, q}$
of this as in Lemma \ref{lemma-ses-termwise-split-cochain}
when we view double complexes
as complexes of complexes in the manner given above.
This on the one hand produces a map
$$
\delta : C^{\bullet, \bullet} \longrightarrow A^{\bullet, \bullet}[0, 1]
$$
by the procedure in Lemma \ref{lemma-ses-termwise-split-cochain}.
On the other hand taking $\text{Tot}$ we obtain a complex
$$
0 \to \text{Tot}(A^{\bullet, \bullet}) \to
\text{Tot}(B^{\bullet, \bullet}) \to
\text{Tot}(C^{\bullet, \bullet}) \to 0
$$
which is termwise split (see below) and hence comes with a morphism
$$
\delta' :
\text{Tot}(C^{\bullet, \bullet})
\longrightarrow
\text{Tot}(A^{\bullet, \bullet})[1]
$$
well defined up to homotopy by Lemmas \ref{lemma-ses-termwise-split-cochain}
and \ref{lemma-ses-termwise-split-homotopy-cochain}. Claim:
these maps agree in the sense that
$$
\text{Tot}(C^{\bullet, \bullet})
\xrightarrow{\text{Tot}(\delta)}
\text{Tot}(A^{\bullet, \bullet}[0, 1]) \xrightarrow{\gamma^{-1}}
\text{Tot}(A^{\bullet, \bullet})[1]
$$
is equal to $\delta'$ where $\gamma$ is as in
Remark \ref{remark-shift-double-complex}. To see this denote
$s^{p, q} : C^{p, q} \to B^{\bullet, q}$ and
$\pi^{p, q} : B^{p, q} \to A^{p, q}$ the components of $s^q$ and $\pi^q$.
As splittings
$(s')^n : \text{Tot}^n(C^{\bullet, \bullet}) \to
\text{Tot}^n(B^{\bullet, \bullet})$
and
$(\pi')^n : \text{Tot}^n(B^{\bullet, \bullet}) \to
\text{Tot}^n(A^{\bullet, \bullet})$
we use the maps whose components are $s^{p, q}$ and $\pi^{p, q}$
for $p + q = n$. We recall that
$$
(\delta')^n =
(\pi')^{n + 1} \circ d_{\text{Tot}(B^{\bullet, \bullet})}^n \circ (s')^n :
\text{Tot}^n(C^{\bullet, \bullet}) \to
\text{Tot}^{n + 1}(A^{\bullet, \bullet})
$$
The restriction of this to the summand $C^{p, q}$ is equal to
$$
\pi^{p + 1, q} \circ
d_1^{p, q} \circ
s^{p, q} +
\pi^{p, q + 1} \circ
(-1)^p d_2^{p, q} \circ
s^{p, q} =
\pi^{p, q + 1} \circ
(-1)^p d_2^{p, q} \circ
s^{p, q}
$$
The equality holds because $s^q$ is a morphism of complexes (with $d_1$
as differential) and because $\pi^{p + 1, q} \circ s^{p + 1, q} = 0$
as $s$ and $\pi$ correspond to a direct sum decomposition of $B$
in every bidegree. On the other hand, for $\delta$ we have
$$
\delta^q =  \pi^q \circ d_2 \circ s^q :
C^{\bullet, q} \to A^{\bullet, q + 1}
$$
whose restriction to the summand $C^{p, q}$ is equal to
$\pi^{p, q + 1} \circ d_2^{p, q} \circ s^{p, q}$.
The difference in signs is exactly canceled out by the sign
of $(-1)^p$ in the isomorphism $\gamma$ and the fourth claim is proven.
\end{remark}

\begin{remark}
\label{remark-double-complex-complex-of-complexes-second}
Let $\mathcal{A}$ be an additive category with countable direct sums.
Let $\text{DoubleComp}(\mathcal{A})$ denote the category of double complexes.
We can consider an object $A^{\bullet, \bullet}$ of
$\text{DoubleComp}(\mathcal{A})$ as a complex of complexes
as follows
$$
\ldots \to A^{-1, \bullet} \to A^{0, \bullet} \to A^{1, \bullet} \to \ldots
$$
For the variant where we switch the role of the indices, see
Remark \ref{remark-double-complex-complex-of-complexes-first}.
In this remark we show that taking the associated total complex
is compatible with all the structures on complexes we have studied
in the chapter so far.

\medskip\noindent
First, observe that the shift functor on double complexes viewed
as complexes of complexes in the manner given above is the functor
$[1, 0]$ defined in Remark \ref{remark-shift-double-complex}.
By Remark \ref{remark-shift-double-complex} the functor
$$
\text{Tot} : \text{DoubleComp}(\mathcal{A}) \to \text{Comp}(\mathcal{A})
$$
is compatible with shift functors, in the sense that we have a functorial
isomorphism $\gamma : \text{Tot}(A^{\bullet, \bullet})[1] \to
\text{Tot}(A^{\bullet, \bullet}[1, 0])$.

\medskip\noindent
Second, if
$$
f, g : A^{\bullet, \bullet} \to B^{\bullet, \bullet}
$$
are homotopic when $f$ and $g$ are viewed as morphisms of complexes
of complexes in the manner given above, then
$$
\text{Tot}(f), \text{Tot}(g) :
\text{Tot}(A^{\bullet, \bullet}) \to \text{Tot}(B^{\bullet, \bullet})
$$
are homotopic maps of complexes. Indeed, let $h = (h^p)$
be a homotopy between $f$ and $g$. If we denote
$h^{p, q} : A^{p, q} \to B^{p - 1, q}$ the component in degree $p$ of $h^q$,
then this means that
$$
f^{p, q} - g^{p, q} = d_1^{p - 1, q} \circ h^{p, q} +
h^{p + 1, q} \circ d_1^{p, q}
$$
The fact that $h^p : A^{p, \bullet} \to B^{p - 1, \bullet}$ is a map of
complexes means that
$$
d_2^{p - 1, q} \circ h^{p, q} = h^{p, q + 1} \circ d_2^{p, q}
$$
Let us define $h' = ((h')^n)$ the homotopy given by the maps
$(h')^n : \text{Tot}^n(A^{\bullet, \bullet}) \to
\text{Tot}^{n - 1}(B^{\bullet, \bullet})$
using $h^{p, q}$ on the summand $A^{p, q}$ for $p + q = n$.
Then we see that
$$
d_{\text{Tot}(B^{\bullet, \bullet})} \circ h' +
h' \circ d_{\text{Tot}(A^{\bullet, \bullet})}
$$
restricted to the summand $A^{p, q}$ is equal to
$$
d_1^{p - 1, q} \circ h^{p, q} +
(-1)^{p - 1} d_2^{p - 1, q} \circ h^{p, q} +
h^{p + 1, q} \circ d_1^{p, q} +
h^{p, q + 1} \circ (-1)^p d_2^{p, q}
$$
which evaluates to $f^{p, q} - g^{p, q}$ by the equations given above.
This proves the second compatibility.

\medskip\noindent
Third, suppose that in the paragraph above we have $f = g$.
Then the assignment $h \leadsto h'$ above is compatible with
the identification of Lemma \ref{lemma-homotopy-shift-cochain}.
More precisely, if we view $h$ as a morphism of complexes
of complexes $A^{\bullet, \bullet} \to B^{\bullet, \bullet}[-1, 0]$
via this lemma then
$$
\text{Tot}(A^{\bullet, \bullet})
\xrightarrow{\text{Tot}(h)}
\text{Tot}(B^{\bullet, \bullet}[-1, 0])
\xrightarrow{\gamma^{-1}}
\text{Tot}(B^{\bullet, \bullet})[-1]
$$
is equal to $h'$ viewed as a morphism of complexes via the lemma.
Here $\gamma$ is the identification of
Remark \ref{remark-shift-double-complex}.
The verification of this third point is immediate.

\medskip\noindent
Fourth, let
$$
0 \to A^{\bullet, \bullet} \to B^{\bullet, \bullet} \to
C^{\bullet, \bullet} \to 0
$$
be a complex of double complexes and suppose we are given splittings
$s^p : C^{p, \bullet} \to B^{p, \bullet}$ and
$\pi^p : B^{p, \bullet} \to A^{p, \bullet}$
of this as in Lemma \ref{lemma-ses-termwise-split-cochain}
when we view double complexes
as complexes of complexes in the manner given above.
This on the one hand produces a map
$$
\delta : C^{\bullet, \bullet} \longrightarrow A^{\bullet, \bullet}[0, 1]
$$
by the procedure in Lemma \ref{lemma-ses-termwise-split-cochain}.
On the other hand taking $\text{Tot}$ we obtain a complex
$$
0 \to \text{Tot}(A^{\bullet, \bullet}) \to
\text{Tot}(B^{\bullet, \bullet}) \to
\text{Tot}(C^{\bullet, \bullet}) \to 0
$$
which is termwise split (see below) and hence comes with a morphism
$$
\delta' :
\text{Tot}(C^{\bullet, \bullet})
\longrightarrow
\text{Tot}(A^{\bullet, \bullet})[1]
$$
well defined up to homotopy by Lemmas \ref{lemma-ses-termwise-split-cochain}
and \ref{lemma-ses-termwise-split-homotopy-cochain}. Claim:
these maps agree in the sense that
$$
\text{Tot}(C^{\bullet, \bullet})
\xrightarrow{\text{Tot}(\delta)}
\text{Tot}(A^{\bullet, \bullet}[1, 0]) \xrightarrow{\gamma^{-1}}
\text{Tot}(A^{\bullet, \bullet})[1]
$$
is equal to $\delta'$ where $\gamma$ is as in
Remark \ref{remark-shift-double-complex}. To see this denote
$s^{p, q} : C^{p, q} \to B^{\bullet, q}$ and
$\pi^{p, q} : B^{p, q} \to A^{p, q}$ the components of $s^q$ and $\pi^q$.
As splittings
$(s')^n : \text{Tot}^n(C^{\bullet, \bullet}) \to
\text{Tot}^n(B^{\bullet, \bullet})$
and
$(\pi')^n : \text{Tot}^n(B^{\bullet, \bullet}) \to
\text{Tot}^n(A^{\bullet, \bullet})$
we use the maps whose components are $s^{p, q}$ and $\pi^{p, q}$
for $p + q = n$. We recall that
$$
(\delta')^n =
(\pi')^{n + 1} \circ d_{\text{Tot}(B^{\bullet, \bullet})}^n \circ (s')^n :
\text{Tot}^n(C^{\bullet, \bullet}) \to
\text{Tot}^{n + 1}(A^{\bullet, \bullet})
$$
The restriction of this to the summand $C^{p, q}$ is equal to
$$
\pi^{p + 1, q} \circ
d_1^{p, q} \circ
s^{p, q} +
\pi^{p, q + 1} \circ
(-1)^p d_2^{p, q} \circ
s^{p, q} =
\pi^{p + 1, q} \circ
d_1^{p, q} \circ
s^{p, q}
$$
The equality holds because $s^p$ is a morphism of complexes (with $d_2$
as differential) and because $\pi^{p, q + 1} \circ s^{p, q + 1} = 0$
as $s$ and $\pi$ correspond to a direct sum decomposition of $B$
in every bidegree. On the other hand, for $\delta$ we have
$$
\delta^p =  \pi^p \circ d_1 \circ s^p :
C^{p, \bullet} \to A^{p + 1, \bullet}
$$
whose restriction to the summand $C^{p, q}$ is equal to
$\pi^{p + 1, q} \circ d_1^{p, q} \circ s^{p, q}$.
Thus we get the same as before which matches with the fact that
the isomorphism
$\gamma : \text{Tot}(A^{\bullet, \bullet})[1] \to
\text{Tot}(A^{\bullet, \bullet}[1, 0])$
is defined without the intervention of signs.
\end{remark}







\section{Filtrations}
\label{section-filtrations}

\noindent
A nice reference for this material is \cite[Section 1]{HodgeII}.
(Note that our conventions regarding abelian categories are different.)

\begin{definition}
\label{definition-filtered}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item A {\it decreasing filtration} $F$ on an object $A$
is a family $(F^nA)_{n \in \mathbf{Z}}$ of subobjects of $A$ such that
$$
A \supset \ldots \supset F^nA \supset F^{n + 1}A \supset \ldots \supset 0
$$
\item A {\it filtered object of $\mathcal{A}$} is
pair $(A, F)$ consisting of an object $A$ of $\mathcal{A}$
and a decreasing filtration $F$ on $A$.
\item A {\it morphism $(A, F) \to (B, F)$ of filtered objects}
is given by a morphism $\varphi : A \to B$ of $\mathcal{A}$
such that $\varphi(F^iA) \subset F^iB$ for all $i \in \mathbf{Z}$.
\item The category of filtered objects is denoted $\text{Fil}(\mathcal{A})$.
\item Given a filtered object $(A, F)$ and a subobject $X \subset A$ the
{\it induced filtration} on $X$ is the filtration with $F^nX = X \cap F^nA$.
\item Given a filtered object $(A, F)$ and a surjection
$\pi : A \to Y$ the {\it quotient filtration} is the filtration with
$F^nY = \pi(F^nA)$.
\item A filtration $F$ on an object $A$ is said to be {\it finite}
if there exist $n, m$ such that $F^nA = A$ and $F^mA = 0$.
\item Given a filtered object $(A, F)$ we say $\bigcap F^iA$ exists
if there exists a biggest subobject of $A$ contained in all $F^iA$.
We say $\bigcup F^iA$ exists if there exists a smallest subobject
of $A$ containing all $F^iA$.
\item The filtration on a filtered object $(A, F)$ is said to be
{\it separated} if $\bigcap F^iA = 0$ and
{\it exhaustive} if $\bigcup F^iA = A$.
\end{enumerate}
\end{definition}

\noindent
By abuse of notation we say that a morphism $f : (A, F) \to (B, F)$
of filtered objects is {\it injective} if $f : A \to B$ is injective
in the abelian category $\mathcal{A}$. Similarly we say $f$ is
{\it surjective} if $f : A \to B$ is surjective in the category
$\mathcal{A}$. Being injective (resp.\ surjective)
is equivalent to being a monomorphism (resp.\ epimorphism)
in $\text{Fil}(\mathcal{A})$. By
Lemma \ref{lemma-filtered}
this is also equivalent to having zero kernel (resp.\ cokernel).

\begin{lemma}
\label{lemma-filtered}
Let $\mathcal{A}$ be an abelian category.
The category of filtered objects $\text{Fil}(\mathcal{A})$
has the following properties:
\begin{enumerate}
\item It is an additive category.
\item It has a zero object.
\item It has kernels and cokernels, images and coimages.
\item In general it is not an abelian category.
\end{enumerate}
\end{lemma}

\begin{proof}
It is clear that $\text{Fil}(\mathcal{A})$ is additive with direct
sum given by $(A, F) \oplus (B, F) = (A \oplus B, F)$ where
$F^p(A \oplus B) = F^pA \oplus F^pB$.
The kernel of a morphism $f : (A, F) \to (B, F)$ of filtered
objects is the injection $\Ker(f) \subset A$ where $\Ker(f)$
is endowed with the induced filtration.
The cokernel of a morphism $f : A \to B$ of filtered
objects is the surjection $B \to \Coker(f)$ where $\Coker(f)$
is endowed with the quotient filtration. Since all kernels and cokernels
exist, so do all coimages and images. See
Example \ref{example-not-abelian}
for the last statement.
\end{proof}

\begin{definition}
\label{definition-strict}
Let $\mathcal{A}$ be an abelian category.
A morphism $f : A \to B$ of filtered objects of $\mathcal{A}$ is
said to be {\it strict} if $f(F^iA) = f(A) \cap F^iB$ for
all $i \in \mathbf{Z}$.
\end{definition}

\noindent
This also equivalent to requiring that $f^{-1}(F^iB) = F^iA + \Ker(f)$
for all $i \in \mathbf{Z}$. We characterize strict morphisms
as follows.

\begin{lemma}
\label{lemma-characterize-strict-general}
Let $\mathcal{A}$ be an abelian category.
Let $f : A \to B$ be a morphism of filtered objects of $\mathcal{A}$.
The following are equivalent
\begin{enumerate}
\item $f$ is strict,
\item the morphism $\Coim(f) \to \Im(f)$ of
Lemma \ref{lemma-coim-im-map}
is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Note that $\Coim(f) \to \Im(f)$ is an isomorphism of
objects of $\mathcal{A}$, and that part (2) signifies that it is
an isomorphism of filtered objects.
By the description of kernels and cokernels in the proof of
Lemma \ref{lemma-filtered}
we see that the filtration on $\Coim(f)$ is the
quotient filtration coming from $A \to \Coim(f)$.
Similarly, the filtration on $\Im(f)$ is the induced
filtration coming from the injection $\Im(f) \to B$.
The definition of strict is exactly that the quotient filtration
is the induced filtration.
\end{proof}

\begin{lemma}
\label{lemma-add-summand-strict-monomorphism}
Let $\mathcal{A}$ be an abelian category.
Let $f : A \to B$ be a strict monomorphism of filtered objects.
Let $g : A \to C$ be a morphism of filtered objects.
Then $f \oplus g : A \to B \oplus C$ is a strict monomorphism.
\end{lemma}

\begin{proof}
Clear from the definitions.
\end{proof}

\begin{lemma}
\label{lemma-add-summand-strict-epimorphism}
Let $\mathcal{A}$ be an abelian category.
Let $f : B \to A$ be a strict epimorphism of filtered objects.
Let $g : C \to A$ be a morphism of filtered objects.
Then $f \oplus g : B \oplus C \to A$ is a strict epimorphism.
\end{lemma}

\begin{proof}
Clear from the definitions.
\end{proof}

\begin{lemma}
\label{lemma-induced-and-quotient-strict}
Let $\mathcal{A}$ be an abelian category.
Let $(A, F)$, $(B, F)$ be filtered objects.
Let $u : A \to B$ be a morphism of filtered objects.
If $u$ is injective then $u$ is strict if and only if the filtration
on $A$ is the induced filtration.
If $u$ is surjective then $u$ is strict if and only if the filtration
on $B$ is the quotient filtration.
\end{lemma}

\begin{proof}
This is immediate from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-strict}
Let $\mathcal{A}$ be an abelian category. Let $f : A \to B$, $g : B \to C$
be strict morphisms of filtered objects.
\begin{enumerate}
\item In general the composition $g \circ f$ is not strict.
\item If $g$ is injective, then $g \circ f$ is strict.
\item If $f$ is surjective, then $g \circ f$ is strict.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $B$ a vector space over a field $k$ with basis $e_1, e_2$, with the
filtration $F^nB = B$ for $n < 0$, with $F^0B = ke_1$, and $F^nB = 0$ for
$n > 0$. Now take $A = k(e_1 + e_2)$ and $C = B/ke_2$ with filtrations
induced by $B$, i.e., such that $A \to B$ and $B \to C$ are strict
(Lemma \ref{lemma-induced-and-quotient-strict}).
Then $F^n(A) = A$ for $n < 0$ and $F^n(A) = 0$ for $n \geq 0$. 
Also $F^n(C) = C$ for $n \leq 0$ and $F^n(C) = 0$ for $n > 0$.
So the (nonzero) composition $A \to C$ is not strict.

\medskip\noindent
Assume $g$ is injective. Then
\begin{align*}
g(f(F^pA)) & = g(f(A) \cap F^pB) \\
& = g(f(A)) \cap g(F^p(B)) \\
& = (g \circ f)(A) \cap (g(B) \cap F^pC) \\
& = (g \circ f)(A) \cap F^pC.
\end{align*}
The first equality as $f$ is strict, the second because $g$ is injective,
the third because $g$ is strict, and the fourth because
$(g \circ f)(A) \subset g(B)$.

\medskip\noindent
Assume $f$ is surjective. Then
\begin{align*}
(g \circ f)^{-1}(F^iC) & = f^{-1}(F^iB + \Ker(g)) \\
& = f^{-1}(F^iB) + f^{-1}(\Ker(g)) \\
& = F^iA + \Ker(f) + \Ker(g \circ f) \\
& = F^iA + \Ker(g \circ f)
\end{align*}
The first equality because $g$ is strict, the second because $f$ is
surjective, the third because $f$ is strict, and the last because
$\Ker(f) \subset \Ker(g \circ f)$.
\end{proof}

\noindent
The following lemma says that subobjects of a filtered object have a well
defined filtration independent of a choice of writing the object as a
cokernel.

\begin{lemma}
\label{lemma-filtration-subobject}
Let $\mathcal{A}$ be an abelian category.
Let $(A, F)$ be a filtered object of $\mathcal{A}$.
Let $X \subset Y \subset A$ be subobjects of $A$.
On the object
$$
Y/X = \Ker(A/X \to A/Y)
$$
the quotient filtration coming from the induced filtration on $Y$ and the
induced filtration coming from the quotient filtration on $A/X$ agree.
Any of the morphisms $X \to Y$, $X \to A$, $Y \to A$, $Y \to A/X$,
$Y \to Y/X$, $Y/X \to A/X$ are strict (with induced/quotient filtrations).
\end{lemma}

\begin{proof}
The quotient filtration $Y/X$ is given by
$F^p(Y/X) = F^pY/(X \cap F^pY) = F^pY/F^pX$
because $F^pY = Y \cap F^pA$ and $F^pX = X \cap F^pA$.
The induced filtration from the injection $Y/X \to A/X$ is given by
\begin{align*}
F^p(Y/X) & = Y/X \cap F^p(A/X) \\
& = Y/X \cap (F^pA + X)/X \\
& = (Y \cap F^pA)/(X \cap F^pA) \\
& = F^pY/F^pX.
\end{align*}
Hence the first statement of the lemma.
The proof of the other cases is similar.
\end{proof}

\begin{lemma}
\label{lemma-pushout-filtered}
Let $\mathcal{A}$ be an abelian category.
Let $A, B, C \in \text{Fil}(\mathcal{A})$.
Let $f : A \to B$ and $g : A \to C$ be morphisms.
Then there exists a pushout
$$
\xymatrix{
A \ar[r]_f \ar[d]_g & B \ar[d]^{g'} \\
C \ar[r]^{f'} & C \amalg_A B
}
$$
in $\text{Fil}(\mathcal{A})$. If $f$ is strict, so is $f'$.
\end{lemma}

\begin{proof}
Set $C \amalg_A B$ equal to $\Coker((g, -f) : A \to C \oplus B)$
in $\text{Fil}(\mathcal{A})$. This cokernel exists, by
Lemma \ref{lemma-filtered}.
It is a pushout, see
Example \ref{example-fibre-product-pushouts}.
Note that $F^p(C \amalg_A B)$ is the image of $F^pC \oplus F^pB$.
Hence
$$
(f')^{-1}(F^p(C \amalg_A B)) = g(f^{-1}(F^pB)) + F^pC
$$
Whence the last statement.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-filtered}
Let $\mathcal{A}$ be an abelian category.
Let $A, B, C \in \text{Fil}(\mathcal{A})$.
Let $f : B \to A$ and $g : C \to A$ be morphisms.
Then there exists a fibre product
$$
\xymatrix{
B \times_A C \ar[r]_{g'} \ar[d]_{f'} & B \ar[d]^f \\
C \ar[r]^g & A
}
$$
in $\text{Fil}(\mathcal{A})$. If $f$ is strict, so is $f'$.
\end{lemma}

\begin{proof}
This lemma is dual to
Lemma \ref{lemma-pushout-filtered}.
\end{proof}

\noindent
Let $\mathcal{A}$ be an abelian category. Let $(A, F)$ be a filtered
object of $\mathcal{A}$. We denote $\text{gr}^p_F(A) = \text{gr}^p(A)$
the object $F^pA/F^{p + 1}A$ of $\mathcal{A}$. This defines an
additive functor
$$
\text{gr}^p :
\text{Fil}(\mathcal{A})
\longrightarrow
\mathcal{A}, \quad
(A, F)
\longmapsto
\text{gr}^p(A).
$$
Recall that we have defined the category $\text{Gr}(\mathcal{A})$
of graded objects of $\mathcal{A}$ in Section \ref{section-graded}.
For $(A, F)$ in $\text{Fil}(\mathcal{A})$ we may set
$$
\text{gr}(A) = \text{the graded object of }\mathcal{A}\text{ whose }
p\text{th graded piece is }\text{gr}^p(A)
$$
and if $\mathcal{A}$ has countable direct sums, then we simply have
$$
\text{gr}(A) = \bigoplus \text{gr}^p(A)
$$
This defines an additive functor
$$
\text{gr} :
\text{Fil}(\mathcal{A})
\longrightarrow
\text{Gr}(\mathcal{A}), \quad
(A, F) \longmapsto \text{gr}(A).
$$

\begin{lemma}
\label{lemma-ses-gr}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item Let $A$ be a filtered object and $X \subset A$. Then for each $p$
the sequence
$$
0 \to \text{gr}^p(X) \to \text{gr}^p(A) \to \text{gr}^p(A/X) \to 0
$$
is exact (with induced filtration on $X$ and quotient filtration on $A/X$).
\item Let $f : A \to B$ be a morphism of filtered objects of $\mathcal{A}$.
Then for each $p$ the sequences
$$
0 \to \text{gr}^p(\Ker(f)) \to \text{gr}^p(A) \to
\text{gr}^p(\Coim(f)) \to 0
$$
and
$$
0 \to \text{gr}^p(\Im(f)) \to \text{gr}^p(B) \to
\text{gr}^p(\Coker(f)) \to 0
$$
are exact.
\end{enumerate}
\end{lemma}

\begin{proof}
We have $F^{p + 1}X = X \cap F^{p + 1}A$, hence map
$\text{gr}^p(X) \to \text{gr}^p(A)$ is injective. Dually the map
$\text{gr}^p(A) \to \text{gr}^p(A/X)$ is surjective.
The kernel of $F^pA/F^{p + 1}A \to A/X + F^{p + 1}A$
is clearly $F^{p + 1}A + X \cap F^pA/F^{p + 1}A = F^pX/F^{p + 1}X$
hence exactness in the middle.
The two short exact sequence of (2) are special cases of the
short exact sequence of (1).
\end{proof}

\begin{lemma}
\label{lemma-characterize-strict}
Let $\mathcal{A}$ be an abelian category.
Let $f : A \to B$ be a morphism of finite
filtered objects of $\mathcal{A}$. The following are equivalent
\begin{enumerate}
\item $f$ is strict,
\item the morphism $\Coim(f) \to \Im(f)$ is an isomorphism,
\item $\text{gr}(\Coim(f)) \to \text{gr}(\Im(f))$ is an
isomorphism,
\item the sequence
$\text{gr}(\Ker(f)) \to \text{gr}(A) \to \text{gr}(B)$
is exact,
\item the sequence $\text{gr}(A) \to \text{gr}(B) \to
\text{gr}(\Coker(f))$ is exact, and
\item the sequence
$$
0 \to
\text{gr}(\Ker(f)) \to
\text{gr}(A) \to
\text{gr}(B) \to
\text{gr}(\Coker(f)) \to 0
$$
is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (1) and (2) is
Lemma \ref{lemma-characterize-strict-general}.
By
Lemma \ref{lemma-ses-gr}
we see that (4), (5), (6) imply (3) and that (3) implies (4), (5), (6).
Hence it suffices to show that (3) implies (2).
Thus we have to show that if $f : A \to B$ is an injective and surjective
map of finite filtered objects which induces and isomorphism
$\text{gr}(A) \to \text{gr}(B)$, then $f$ induces an isomorphism of
filtered objects. In other words, we have to show that
$f(F^pA) = F^pB$ for all $p$.
As the filtrations are finite we may prove this by descending induction
on $p$. Suppose that $f(F^{p + 1}A) = F^{p + 1}B$.
Then commutative diagram
$$
\xymatrix{
0 \ar[r] &
F^{p + 1}A \ar[r] \ar[d]^f &
F^pA \ar[r] \ar[d]^f &
\text{gr}^p(A) \ar[r] \ar[d]^{\text{gr}^p(f)} &
0 \\
0 \ar[r] &
F^{p + 1}B \ar[r] &
F^pB \ar[r] &
\text{gr}^p(B) \ar[r] &
0
}
$$
and the five lemma imply that $f(F^pA) = F^pB$.
\end{proof}

\begin{lemma}
\label{lemma-filtered-complex}
Let $\mathcal{A}$ be an abelian category. Let $A \to B \to C$ be a complex
of filtered objects of $\mathcal{A}$. Assume $\alpha : A \to B$ and
$\beta : B \to C$ are strict morphisms of filtered objects. Then
$\text{gr}(\Ker(\beta)/\Im(\alpha)) =
\Ker(\text{gr}(\beta))/\Im(\text{gr}(\alpha)))$.
\end{lemma}

\begin{proof}
This follows formally from
Lemma \ref{lemma-ses-gr}
and the fact that
$\Coim(\alpha) \cong \Im(\alpha)$ and
$\Coim(\beta) \cong \Im(\beta)$ by
Lemma \ref{lemma-characterize-strict-general}.
\end{proof}

\begin{lemma}
\label{lemma-filtered-acyclic}
Let $\mathcal{A}$ be an abelian category.
Let $A \to B \to C$ be a complex of filtered objects of $\mathcal{A}$.
Assume $A, B, C$ have finite filtrations and that
$\text{gr}(A) \to \text{gr}(B) \to \text{gr}(C)$ is exact.
Then
\begin{enumerate}
\item for each $p \in \mathbf{Z}$ the sequence
$\text{gr}^p(A) \to \text{gr}^p(B) \to \text{gr}^p(C)$ is exact,
\item for each $p \in \mathbf{Z}$ the sequence
$F^p(A) \to F^p(B) \to F^p(C)$ is exact,
\item for each $p \in \mathbf{Z}$ the sequence
$A/F^p(A) \to B/F^p(B) \to C/F^p(C)$ is exact,
\item the maps $A \to B$ and $B \to C$ are strict, and
\item $A \to B \to C$ is exact (as a sequence in $\mathcal{A}$).
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) is immediate from the definitions.
We will prove (3) by induction on the length of the filtrations.
If each of $A$, $B$, $C$ has only one
nonzero graded part, then (3) holds as $\text{gr}(A) = A$, etc.
Let $n$ be the largest integer such that at least one of
$F^nA, F^nB, F^nC$ is nonzero. Set $A' = A/F^nA$, $B' = B/F^nB$,
$C' = C/F^nC$ with induced filtrations. Note that
$\text{gr}(A) = F^nA \oplus \text{gr}(A')$
and similarly for $B$ and $C$. The induction hypothesis
applies to $A' \to B' \to C'$, which implies that
$A/F^p(A) \to B/F^p(B) \to C/F^p(C)$ is exact for $p \geq n$.
To conclude the same for $p = n + 1$, i.e., to prove that $A \to B \to C$
is exact we use the commutative diagram
$$
\xymatrix{
0 \ar[r] & F^nA \ar[r] \ar[d] & A \ar[r] \ar[d] & A' \ar[r] \ar[d] & 0 \\
0 \ar[r] & F^nB \ar[r] \ar[d] & B \ar[r] \ar[d] & B' \ar[r] \ar[d] & 0 \\
0 \ar[r] & F^nC \ar[r] & C \ar[r] & C' \ar[r] & 0
}
$$
whose rows are short exact sequences of objects of $\mathcal{A}$.
The proof of (2) is dual. Of course (5) follows from (2).

\medskip\noindent
To prove (4) denote $f : A \to B$ and $g : B \to C$ the given morphisms.
We know that $f(F^p(A)) = \Ker(F^p(B) \to F^p(C))$ by (2) and
$f(A) = \Ker(g)$ by (5). Hence
$f(F^p(A)) =  \Ker(F^p(B) \to F^p(C)) =
\Ker(g) \cap F^p(B) = f(A) \cap F^p(B)$ which proves that
$f$ is strict. The proof that $g$ is strict is dual to this.
\end{proof}











\section{Spectral sequences}
\label{section-spectral-sequence}

\noindent
A nice discussion of spectral sequences may be found in
\cite{Eisenbud}. See also \cite{McCleary}, \cite{Lang}, etc.

\begin{definition}
\label{definition-spectral-sequence}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item A {\it spectral sequence in $\mathcal{A}$} is given by a
system $(E_r, d_r)_{r \geq 1}$ where each $E_r$ is an object
of $\mathcal{A}$, each $d_r : E_r \to E_r$ is a morphism such
that $d_r \circ d_r = 0$ and $E_{r + 1} = \Ker(d_r)/\Im(d_r)$
for $r \geq 1$.
\item A {\it morphism of spectral sequences}
$f : (E_r, d_r)_{r \geq 1} \to (E'_r, d'_r)_{r \geq 1}$ is
given by a family of morphisms $f_r : E_r \to E'_r$ such that
$f_r \circ d_r = d'_r \circ f_r$ and such that $f_{r + 1}$
is the morphism induced by $f_r$ via the identifications
$E_{r + 1} = \Ker(d_r)/\Im(d_r)$
and
$E'_{r + 1} = \Ker(d'_r)/\Im(d'_r)$.
\end{enumerate}
\end{definition}

\noindent
We will sometimes loosen this definition somewhat and allow $E_{r + 1}$
to be an object with a given isomorphism
$E_{r + 1} \to \Ker(d_r)/\Im(d_r)$.
In addition we sometimes have a system $(E_r, d_r)_{r \geq r_0}$
for some $r_0 \in \mathbf{Z}$ satisfying the properties of the definition above
for indices $\geq r_0$. We will also call this a spectral sequence since by
a simple renumbering it falls under the definition anyway.
In fact, the cases $r_0 = 0$ and $r_0 = -1$ can be found in the literature.

\medskip\noindent
Given a spectral sequence $(E_r, d_r)_{r \geq 1}$ we define
$$
0 = B_1 \subset B_2 \subset \ldots \subset B_r \subset \ldots
\subset Z_r \subset \ldots \subset Z_2 \subset Z_1 = E_1
$$
by the following simple procedure. Set $B_2 = \Im(d_1)$
and $Z_2 = \Ker(d_1)$. Then it is clear that
$d_2 : Z_2/B_2 \to Z_2/B_2$. Hence we can define $B_3$ as the unique
subobject of $E_1$ containing $B_2$ such that $B_3/B_2$ is the image
of $d_2$. Similarly we can define $Z_3$ as the unique subobject of
$E_1$ containing $B_2$ such that $Z_3/B_2$ is the kernel of $d_2$.
And so on and so forth. In particular we have
$$
E_r = Z_r/B_r
$$
for all $r \geq 1$. In case the spectral sequence starts at $r = r_0$
then we can similarly construct $B_i$, $Z_i$ as subobjects in $E_{r_0}$.
In fact, in the literature one sometimes finds the notation
$$
0 = B_r(E_r) \subset B_{r + 1}(E_r) \subset B_{r + 2}(E_r) \subset \ldots
\subset Z_{r + 2}(E_r) \subset Z_{r + 1}(E_r) \subset Z_r(E_r) = E_r
$$
to denote the filtration described above but starting with $E_r$.

\begin{definition}
\label{definition-limit-spectral-sequence}
Let $\mathcal{A}$ be an abelian category.
Let $(E_r, d_r)_{r \geq 1}$ be a spectral sequence.
\begin{enumerate}
\item If the subobjects $Z_{\infty} = \bigcap Z_r$
and $B_{\infty} = \bigcup B_r$ of $E_1$ exist then we define
the {\it limit}\footnote{This notation is not universally accepted. In some
references an additional pair of subobjects
$Z_\infty$ and $B_\infty$ of $E_1$ such that
$0 = B_1 \subset B_2 \subset \ldots \subset B_\infty \subset Z_\infty
\subset \ldots \subset Z_2 \subset Z_1 = E_1$
is part of the data comprising a spectral sequence!}
of the spectral sequence to be the object
$E_{\infty} = Z_{\infty}/B_{\infty}$.
\item We say that the spectral sequence {\it degenerates at $E_r$}
if the differentials $d_r, d_{r + 1}, \ldots$ are all zero.
\end{enumerate}
\end{definition}

\noindent
Note that if the spectral sequence degenerates at $E_r$, then
we have $E_r = E_{r + 1} = \ldots = E_{\infty}$ (and the limit
exists of course). Also, almost any abelian category we will encounter
has countable sums and intersections.

\begin{remark}[Variant]
\label{remark-allow-translation-functors}
It is often the case that the terms of a spectral sequence have
additional structure, for example a grading or a bigrading.
To accommodate this (and to get around certain technical issues)
we introduce the following notion. Let $\mathcal{A}$ be an
abelian category. Let $(T_r)_{r \geq 1}$ be a
sequence of {\it translation} or {\it shift} functors, i.e.,
$T_r : \mathcal{A} \to \mathcal{A}$ is an isomorphism of categories.
In this setting a {\it spectral sequence} is given by a system
$(E_r, d_r)_{r \geq 1}$ where each $E_r$ is an object of
$\mathcal{A}$, each $d_r : E_r \to T_rE_r$
is a morphism such that $T_rd_r \circ d_r = 0$ so that
$$
\xymatrix{
\ldots \ar[r] &
T_r^{-1}E_r \ar[r]^-{T_r^{-1}d_r} &
E_r \ar[r]^-{d_r} &
T_rE_r \ar[r]^{T_r d_r} &
T_r^2E_r \ar[r] & \ldots
}
$$
is a complex and $E_{r + 1} = \Ker(d_r)/\Im(T_r^{-1}d_r)$ for $r \geq 1$.
It is clear what a {\it morphism of spectral sequences}
means in this setting. In this setting we can still define
$$
0 = B_1 \subset B_2 \subset \ldots \subset B_r \subset \ldots
\subset Z_r \subset \ldots \subset Z_2 \subset Z_1 = E_1
$$
and $Z_\infty$ and $B_\infty$ (if they exist) as above.
\end{remark}










\section{Spectral sequences: exact couples}
\label{section-exact-couple}

\begin{definition}
\label{definition-exact-couple}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item An {\it exact couple} is a datum $(A, E, \alpha, f, g)$ where
$A$, $E$ are objects of $\mathcal{A}$ and $\alpha$, $f$, $g$
are morphisms as in the following diagram
$$
\xymatrix{
A \ar[rr]_{\alpha} & & A \ar[ld]^g \\
& E \ar[lu]^f &
}
$$
with the property that the kernel of each arrow is the image
of its predecessor. So $\Ker(\alpha) = \Im(f)$,
$\Ker(f) = \Im(g)$, and $\Ker(g) = \Im(\alpha)$.
\item A {\it morphism of exact couples}
$t : (A, E, \alpha, f, g) \to (A', E', \alpha', f', g')$
is given by morphisms $t_A : A \to A'$ and
$t_E : E \to E'$ such that
$\alpha' \circ t_A = t_A \circ \alpha$,
$f' \circ t_E = t_A \circ f$, and
$g' \circ t_A = t_E \circ g$.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-derived-exact-couple}
Let $(A, E, \alpha, f, g)$ be an exact couple in an abelian category
$\mathcal{A}$. Set
\begin{enumerate}
\item $d = g \circ f : E \to E$ so that $d \circ d = 0$,
\item $E' = \Ker(d)/\Im(d)$,
\item $A' = \Im(\alpha)$,
\item $\alpha' : A' \to A'$ induced by $\alpha$,
\item $f' : E' \to A'$ induced by $f$,
\item $g' : A' \to E'$ induced by ``$g \circ \alpha^{-1}$''.
\end{enumerate}
Then we have
\begin{enumerate}
\item $\Ker(d) = f^{-1}(\Ker(g)) = f^{-1}(\Im(\alpha))$,
\item $\Im(d) = g(\Im(f)) = g(\Ker(\alpha))$,
\item $(A', E', \alpha', f', g')$ is an exact couple.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
Hence it is clear that given an exact couple $(A, E, \alpha, f, g)$
we get a spectral sequence by setting $E_1 = E$, $d_1 = d$,
$E_2 = E'$, $d_2 = d' = g' \circ f'$, $E_3 = E''$, $d_3 = d'' = g'' \circ f''$,
and so on.

\begin{definition}
\label{definition-spectral-sequence-associated-exact-couple}
Let $\mathcal{A}$ be an abelian category.
Let $(A, E, \alpha, f, g)$ be an exact couple.
The {\it spectral sequence associated to the exact couple}
is the spectral sequence $(E_r, d_r)_{r \geq 1}$ with
$E_1 = E$, $d_1 = d$, $E_2 = E'$, $d_2 = d' = g' \circ f'$,
$E_3 = E''$, $d_3 = d'' = g'' \circ f''$,
and so on.
\end{definition}

\begin{lemma}
\label{lemma-spectral-sequence-associated-exact-couple}
Let $\mathcal{A}$ be an abelian category.
Let $(A, E, \alpha, f, g)$ be an exact couple.
Let $(E_r, d_r)_{r \geq 1}$ be the spectral sequence
associated to the exact couple.
In this case we have
$$
0 = B_1 \subset \ldots \subset
B_{r + 1} = g(\Ker(\alpha^r))
\subset \ldots \subset
Z_{r + 1} = f^{-1}(\Im(\alpha^r))
\subset \ldots \subset Z_1 = E
$$
and the map $d_{r + 1} : E_{r + 1} \to E_{r + 1}$
is described by the following rule:
For any (test) object $T$ of $\mathcal{A}$ and any elements
$x : T \to Z_{r + 1}$ and $y : T \to A$ such that
$f \circ x = \alpha^r \circ y$ we have
$$
d_{r + 1} \circ \overline{x} = \overline{g \circ y}
$$
where $\overline{x} : T \to E_{r + 1}$ is the
induced morphism.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
Note that in the situation of the lemma we obviously have
$$
B_\infty = g\left(\bigcup\nolimits_r \Ker(\alpha^r)\right)
\subset
Z_\infty = f^{-1}\left(\bigcap\nolimits_r \Im(\alpha^r)\right)
$$
provided $\bigcup \Ker(\alpha^r)$ and $\bigcap \Im(\alpha^r)$ exist.
This produces as limit $E_\infty = Z_\infty / B_\infty$, see
Definition \ref{definition-limit-spectral-sequence}.

\begin{remark}[Variant]
\label{remark-shifted-exact-couple}
Let $\mathcal{A}$ be an abelian category. Let
$S, T : \mathcal{A} \to \mathcal{A}$ be shift
functors, i.e., isomorphisms of categories. We will indicate
the $n$-fold compositions by $S^nA$ and $T^nA$ for
$A \in \Ob(\mathcal{A})$ and $n \in \mathbf{Z}$.
In this situation an {\it exact couple} is a datum $(A, E, \alpha, f, g)$
where $A$, $E$ are objects of $\mathcal{A}$ and $\alpha : A \to T^{-1}A$,
$f : E \to A$, $g : A \to SE$ are morphisms such that
$$
\xymatrix{
TE \ar[r]^-{Tf} &
TA \ar[r]^-{T\alpha} &
A \ar[r]^-{g} &
SE \ar[r]^{Sf} & SA
}
$$
is an exact complex. Let's visualize this as follows
$$
\xymatrix{
TA \ar[rrr]_{T\alpha} & & &
A \ar[ld]^g \ar[rrr]_\alpha & & &
T^{-1}A \ar[ld]^{T^{-1}g} \\
& TE \ar[lu]^{Tf} \ar@{..}[r] & SE & &
E \ar[lu]^f \ar@{..}[r] & T^{-1}SE
}
$$
We set $d = g \circ f : E \to SE$. Then $d \circ S^{-1}d =
g \circ f \circ S^{-1}g \circ S^{-1}f = 0$ because $f \circ S^{-1}g = 0$.
Set $E' = \Ker(d)/\Im(S^{-1}d)$. Set $A' = \Im(T\alpha)$.
Let $\alpha' : A' \to T^{-1}A'$ induced by $\alpha$.
Let $f' : E' \to A'$ be induced by $f$ which works because
$f(\Ker(d)) \subset \Ker(g) = \Im(T\alpha)$.
Finally, let $g' : A' \to TSE'$ induced by
``$Tg \circ (T\alpha)^{-1}$''\footnote{This works because
$TSE' = \Ker(TSd)/\Im(Td)$ and
$Tg(\Ker(T\alpha)) = Tg(\Im(Tf)) = \Im(T(d))$
and $TS(d)(\Im(Tg)) = \Im(TSg \circ TSf \circ Tg) = 0$.}.

\medskip\noindent
In exactly the same way as above we find
\begin{enumerate}
\item $\Ker(d) = f^{-1}(\Ker(g)) = f^{-1}(\Im(T\alpha))$,
\item $\Im(d) = g(\Im(f)) = g(\Ker(\alpha))$,
\item $(A', E', \alpha', f', g')$ is an exact couple
for the shift functors $TS$ and $T$.
\end{enumerate}
We obtain a spectral sequence
(as in Remark \ref{remark-allow-translation-functors})
with $E_1 = E$, $E_2 = E'$, etc, with $d_r : E_r \to T^{r - 1}SE_r$
for all $r \geq 1$. Lemma \ref{lemma-spectral-sequence-associated-exact-couple}
tells us that
$$
SB_{r + 1} =
g(\Ker(T^{-r + 1}\alpha \circ \ldots \circ T^{-1}\alpha \circ \alpha))
$$
and
$$
Z_{r + 1} = f^{-1}(\Im(T\alpha \circ T^2\alpha \circ \ldots \circ T^r\alpha))
$$
in this situation. The description of the map $d_{r + 1}$ is similar
to that given in the lemma. (It may be easier to use these explicit
descriptions to prove one gets a spectral sequence from such an exact
couple.)
\end{remark}






\section{Spectral sequences: differential objects}
\label{section-differential-object}

\begin{definition}
\label{definition-differential-object}
Let $\mathcal{A}$ be an abelian category.
A {\it differential object} of $\mathcal{A}$
is a pair $(A, d)$ consisting of an
object $A$ of $\mathcal{A}$
endowed with a selfmap $d$ such that $d \circ d = 0$.
A {\it morphism of differential objects} $(A, d) \to (B, d)$
is given by a morphism $\alpha : A \to B$ such that
$d \circ \alpha = \alpha \circ d$.
\end{definition}

\begin{lemma}
\label{lemma-differential-objects-abelian}
\begin{slogan}
The category of differential objects of an abelian category is itself
an abelian category.
\end{slogan}
Let $\mathcal{A}$ be an abelian category.
The category of differential objects of $\mathcal{A}$ is abelian.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-differential-object-homology}
For a differential object $(A, d)$ we denote
$$
H(A, d) = \Ker(d)/\Im(d)
$$
its {\it homology}.
\end{definition}

\begin{lemma}
\label{lemma-differential-objects-ses}
Let $\mathcal{A}$ be an abelian category.
Let $0 \to (A, d) \to (B, d) \to (C, d) \to 0$ be a short exact sequence
of differential objects. Then we get an exact homology sequence
$$
\ldots \to H(C, d) \to H(A, d) \to H(B, d) \to H(C, d) \to \ldots
$$
\end{lemma}

\begin{proof}
Apply Lemma \ref{lemma-long-exact-sequence-cochain}
to the short exact sequence of complexes
$$
\begin{matrix}
0 & \to & A & \to & B & \to & C & \to & 0 \\
& & \downarrow & & \downarrow & & \downarrow \\
0 & \to & A & \to & B & \to & C & \to & 0 \\
& & \downarrow & & \downarrow & & \downarrow \\
0 & \to & A & \to & B & \to & C & \to & 0
\end{matrix}
$$
where the vertical arrows are $d$.
\end{proof}

\noindent
We come to an important example of a spectral sequence.
Let $\mathcal{A}$ be an abelian category.
Let $(A, d)$ be a differential object of $\mathcal{A}$.
Let $\alpha : (A, d) \to (A, d)$ be an endomorphism of this differential
object. If we assume $\alpha$ injective, then we get a short exact sequence
$$
0 \to (A, d) \to (A, d) \to (A/\alpha A, d) \to 0
$$
of differential objects. By the
Lemma \ref{lemma-differential-objects-ses} we get an exact couple
$$
\xymatrix{
H(A, d) \ar[rr]_{\overline{\alpha}} & & H(A, d) \ar[ld]^g \\
& H(A/\alpha A, d) \ar[lu]^f &
}
$$
where $g$ is the canonical map and $f$ is the map defined in the snake lemma.
Thus we get an associated spectral sequence!
Since in this case we have $E_1 = H(A/\alpha A, d)$ we
see that it makes sense to define $E_0 = A/\alpha A$
and $d_0 = d$. In other words, we start the spectral sequence
with $r = 0$. According to our conventions in
Section \ref{section-spectral-sequence} we define a sequence of subobjects
$$
0 = B_0 \subset \ldots \subset B_r \subset \ldots
\subset Z_r \subset \ldots \subset Z_0 = E_0
$$
with the property that $E_r = Z_r/B_r$. Namely we have
for $r \geq 1$ that
\begin{enumerate}
\item $B_r$ is the image of $(\alpha^{r - 1})^{-1}(d A)$
under the natural map $A \to A/\alpha A$,
\item $Z_r$ is the image of $d^{-1}(\alpha^r A)$
under the natural map $A \to A/\alpha A$, and
\item $d_r : E_r \to E_r$ is given as follows: given an element $z \in Z_r$
choose an element $y \in A$ such that $d(z) = \alpha^r(y)$. Then
$d_r(z + B_r + \alpha A) = y + B_r + \alpha A$.
\end{enumerate}
Warning: It is not necessarily the case that
$\alpha A \subset (\alpha^{r - 1})^{-1}(dA)$, nor
$\alpha A \subset d^{-1}(\alpha^r A)$. It is true that
$(\alpha^{r - 1})^{-1}(dA) \subset d^{-1}(\alpha^r A)$.
We have
$$
E_r
=
\frac{d^{-1}(\alpha^r A) + \alpha A}{(\alpha^{r - 1})^{-1}(dA) + \alpha A}.
$$
It is not hard to verify directly that (1) -- (3) give a spectral sequence.

\begin{definition}
\label{definition-differential-object-selfmap}
Let $\mathcal{A}$ be an abelian category.
Let $(A, d)$ be a differential object of $\mathcal{A}$.
Let $\alpha : A \to A$ be an injective selfmap of $A$ which
commutes with $d$. The {\it spectral sequence associated to
$(A, d, \alpha)$} is the spectral sequence
$(E_r, d_r)_{r \geq 0}$ described above.
\end{definition}

\begin{remark}[Variant]
\label{remark-differential-object-selfmap}
Let $\mathcal{A}$ be an abelian category and let
$S, T : \mathcal{A} \to \mathcal{A}$ be shift functors, i.e.,
isomorphisms of categories. Assume that $TS = ST$ as functors.
Consider pairs $(A, d)$ consisting of an object $A$ of $\mathcal{A}$
and a morphism $d : A \to SA$ such that $d \circ S^{-1}d = 0$.
The category of these objects is abelian.
We define $H(A, d) = \Ker(d)/\Im(S^{-1}d)$ and we observe that
$H(SA, Sd) = SH(A, d)$ (canonical isomorphism).
Given a short exact sequence
$$
0 \to (A, d) \to (B, d) \to (C, d) \to 0
$$
we obtain a long exact homology sequence
$$
\ldots \to S^{-1}H(C, d) \to
H(A, d) \to H(B, d) \to H(C, d) \to SH(A, d) \to \ldots
$$
(note the shifts in the boundary maps). Since $ST = TS$ the functor
$T$ defines a shift functor on pairs by setting $T(A, d) = (TA, Td)$.
Next, let $\alpha : (A, d) \to T^{-1}(A, d)$ be injective with
cokernel $(Q, d)$. Then we get an exact couple as in
Remark \ref{remark-shifted-exact-couple} with shift functors $TS$ and
$T$ given by
$$
(H(A, d), S^{-1}H(Q, d), \overline{\alpha}, f, g)
$$
where $\overline{\alpha} : H(A, d) \to T^{-1}H(A, d)$ is induced by $\alpha$,
the map $f : S^{-1}H(Q, d) \to H(A, d)$ is the boundary
map and $g : H(A, d) \to TH(Q, d) = TS(S^{-1}H(Q, d))$ is induced by
the quotient map $A \to TQ$. Thus we get a spectral sequence as above
with $E_1 = S^{-1}H(Q, d)$ and differentials $d_r : E_r \to T^rSE_r$.
As above we set $E_0 = S^{-1}Q$ and $d_0 : E_0 \to SE_0$ given by
$S^{-1}d : S^{-1}Q \to Q$. If according to our conventions we define
$B_r \subset Z_r \subset E_0$, then we have for $r \geq 1$ that
\begin{enumerate}
\item $SB_r$ is the image of
$$
(T^{-r + 1}\alpha \circ \ldots \circ T^{-1}\alpha)^{-1}
\Im(T^{-r}S^{-1}d)
$$
under the natural map $T^{-1}A \to Q$,
\item $Z_r$ is the image of
$$
(S^{-1}T^{-1}d)^{-1}
\Im(\alpha \circ \ldots \circ T^{r - 1}\alpha)
$$
under the natural map $S^{-1}T^{-1}A \to S^{-1}Q$.
\end{enumerate}
The differentials can be described as follows: if $x \in Z_r$, then
pick $x' \in S^{-1}T^{-1}A$ mapping to $x$. Then $S^{-1}T^{-1}d(x')$
is $(\alpha \circ \ldots \circ T^{r - 1}\alpha)(y)$ for some
$y \in T^{r - 1}A$. Then $d_r(x) \in T^rSE_r$ is represented by the
class of the image of $y$ in $T^rSE_0 = T^rQ$ modulo $T^rSB_r$.
\end{remark}













\section{Spectral sequences: filtered differential objects}
\label{section-filtered-differential}

\noindent
We can build a spectral sequence starting with a filtered
differential object.

\begin{definition}
\label{definition-filtered-differential}
Let $\mathcal{A}$ be an abelian category.
A {\it filtered differential object} $(K, F, d)$ is a filtered object
$(K, F)$ of $\mathcal{A}$ endowed with an endomorphism
$d : (K, F) \to (K, F)$ whose square is zero: $d \circ d = 0$.
\end{definition}

\noindent
To describe the spectral sequence associated to such an object
we assume, for the moment, that $\mathcal{A}$ is an abelian category
which has countable direct sums and countable direct sums are exact
(this is not automatic, see Remark \ref{remark-direct-sums-not-exact}).
Let $(K, F, d)$ be a filtered differential object of $\mathcal{A}$.
Note that each $F^nK$ is a differential object by itself.
Consider the object $A = \bigoplus F^nK$ and endow it with a
differential $d$ by using $d$ on each summand.
Then $(A, d)$ is a differential object of $\mathcal{A}$
which comes equipped with a grading. Consider the map
$$
\alpha : A \to A
$$
which is given by the inclusions $F^nK \to F^{n - 1}K$.
This is clearly an injective morphism of differential objects
$\alpha : (A, d) \to (A, d)$. Hence, by
Definition \ref{definition-differential-object-selfmap}
we get a spectral sequence.
We will call this {\it the spectral sequence associated to
the filtered differential object $(K, F, d)$}.

\medskip\noindent
Let us figure out the terms of this spectral sequence.
First, note that $A/\alpha A = \text{gr}(K)$
endowed with its differential $d = \text{gr}(d)$. Hence we see that
$$
E_0 = \text{gr}(K), \quad d_0 = \text{gr}(d).
$$
Hence the homology of the graded differential object $\text{gr}(K)$
is the next term:
$$
E_1 = H(\text{gr}(K), \text{gr}(d)).
$$
In addition we see that $E_0$ is a graded object of $\mathcal{A}$
and that $d_0$ is compatible with the grading. Hence clearly $E_1$
is a graded object as well. But it turns out that the differential
$d_1$ does not preserve this grading; instead it shifts the degree by $1$.

\medskip\noindent
To work this out precisely, we define
$$
Z_r^p =
\frac{F^pK \cap d^{-1}(F^{p + r}K) + F^{p + 1}K}{F^{p + 1}K}
$$
and
$$
B_r^p =
\frac{F^pK \cap d(F^{p - r + 1}K) + F^{p + 1}K}{F^{p + 1}K}.
$$
This notation, although quite natural, seems to be different from the
notation in most places in the literature. Perhaps it does not matter,
since the literature does not seem to have a consistent choice of notation
either. With these choices we see that $B_r \subset E_0$,
resp.\ $Z_r \subset E_0$ (as defined in
Section \ref{section-differential-object}) is equal to
$\bigoplus_p B_r^p$, resp.\ $\bigoplus_p Z_r^p$.
Hence if we define
$$
E_r^p = Z_r^p/B_r^p
$$
for $r \geq 0$ and $p \in \mathbf{Z}$, then we have $E_r = \bigoplus_p E_r^p$.
We can define a differential $d_r^p : E_r^p \to E_r^{p + r}$
by the rule
$$
z + F^{p + 1}K
\longmapsto
dz + F^{p + r + 1}K
$$
where $z \in F^pK \cap d^{-1}(F^{p + r}K)$.

\begin{lemma}
\label{lemma-spectral-sequence-filtered-differential}
Let $\mathcal{A}$ be an abelian category. Let $(K, F, d)$ be a
filtered differential object of $\mathcal{A}$. There is a
spectral sequence $(E_r, d_r)_{r \geq 0}$ in $\text{Gr}(\mathcal{A})$
associated to $(K, F, d)$ such that $d_r : E_r \to E_r[r]$
for all $r$ and such that the graded pieces
$E_r^p$ and maps $d_r^p : E_r^p \to E_r^{p + r}$
are as given above. Furthermore, $E_0^p = \text{gr}^p K$,
$d_0^p = \text{gr}^p(d)$, and $E_1^p = H(\text{gr}^pK, \text{gr}^p(d))$.
\end{lemma}

\begin{proof}
If $\mathcal{A}$ has countable direct sums and if countable direct
sums are exact, then this follows from the discussion above.
In general, we proceed as follows; we strongly suggest the reader
skip this proof. Consider the object $A = (F^{p + 1}K)$ of
$\text{Gr}(\mathcal{A})$, i.e., we put $F^{p + 1}K$ in degree $p$
(the funny shift in numbering to get numbering correct later on).
We endow it with a differential $d$ by using $d$ on each component.
Then $(A, d)$ is a differential object of $\text{Gr}(\mathcal{A})$.
Consider the map
$$
\alpha : A \to A[-1]
$$
which is given in degree $p$ by the inclusions $F^{p + 1}A \to F^pA$.
This is clearly an injective morphism of differential objects
$\alpha : (A, d) \to (A, d)[-1]$. Hence, we can apply
Remark \ref{remark-differential-object-selfmap}
with $S = \text{id}$ and $T = [1]$.
The corresponding spectral sequence $(E_r, d_r)_{r \geq 0}$
in $\text{Gr}(\mathcal{A})$ is the spectral sequence we are looking
for. Let us unwind the definitions a bit.
First of all we have $E_r = (E_r^p)$ is an object of $\text{Gr}(\mathcal{A})$.
Then, since $T^rS = [r]$ we have $d_r : E_r \to E_r[r]$ which means that
$d_r^p : E_r^p \to E_r^{p + r}$.

\medskip\noindent
To see that the description of the graded pieces hold, we argue
as above. Namely, first we have $E_0 = \Coker(\alpha : A \to A[-1])$
and by our choice of numbering above this gives
$E_0^p = \text{gr}^pK$. The first differential is given by
$d_0^p = \text{gr}^pd : E_0^p \to E_0^p$.
Next, the description of the boundaries $B_r$ and the cocycles $Z_r$
in Remark \ref{remark-differential-object-selfmap}
translates into a straightforward manner into the formulae
for $Z_r^p$ and $B_r^p$ given above.
\end{proof}

\begin{lemma}
\label{lemma-spectral-sequence-filtered-differential-d1}
Let $\mathcal{A}$ be an abelian category. Let $(K, F, d)$ be a filtered
differential object of $\mathcal{A}$. The spectral sequence
$(E_r, d_r)_{r \geq 0}$ associated to $(K, F, d)$ has
$$
d_1^p :
E_1^p = H(\text{gr}^pK)
\longrightarrow
H(\text{gr}^{p + 1}K) = E_1^{p + 1}
$$
equal to the boundary map in homology associated to the short
exact sequence of differential objects
$$
0 \to \text{gr}^{p + 1}K \to F^pK/F^{p + 2}K \to \text{gr}^pK \to 0.
$$
\end{lemma}

\begin{proof}
This is clear from the formula for the differential $d_1^p$
given just above Lemma \ref{lemma-spectral-sequence-filtered-differential}.
\end{proof}

\begin{definition}
\label{definition-filtration-cohomology-filtered-differential}
Let $\mathcal{A}$ be an abelian category.
Let $(K, F, d)$ be a filtered differential object of $\mathcal{A}$.
The {\it induced filtration} on $H(K, d)$ is the filtration defined
by $F^pH(K, d) = \Im(H(F^pK, d) \to H(K, d))$.
\end{definition}

\noindent
Writing out what this means we see that
$$
F^pH(K, d) =
\frac{\Ker(d) \cap F^pK + \Im(d)}{\Im(d)}
$$
and hence we see that
$$
\text{gr}^p H(K) =
\frac{\Ker(d) \cap F^pK + \Im(d)}{\Ker(d) \cap F^{p + 1}K + \Im(d)} =
\frac{\Ker(d) \cap F^pK}{\Ker(d) \cap F^{p + 1}K + \Im(d) \cap F^pK}
$$

\begin{lemma}
\label{lemma-compute-filtered-cohomology}
Let $\mathcal{A}$ be an abelian category. Let $(K, F, d)$ be a filtered
differential object of $\mathcal{A}$. If $Z_\infty^p$ and $B_\infty^p$
exist (see proof), then
\begin{enumerate}
\item the limit $E_\infty$ exists and is graded having
$E_\infty^p = Z_\infty^p/B_\infty^p$ in degree $p$, and
\item the associated graded $\text{gr}(H(K))$ of the cohomology of $K$
is a graded subquotient of the graded limit object $E_\infty$.
\end{enumerate}
\end{lemma}

\begin{proof}
The objects $Z_\infty$, $B_\infty$, and the limit
$E_\infty = Z_\infty/B_\infty$ of
Definition \ref{definition-limit-spectral-sequence}
are objects of $\text{Gr}(\mathcal{A})$ by our construction of
the spectral sequence in the proof of
Lemma \ref{lemma-spectral-sequence-filtered-differential}.
Since $Z_r^p$, resp.\ $B_r^p$ is the $p$th graded part of $Z_r$, resp.\  $B_r$,
if we assume that
$$
Z_\infty^p = \bigcap\nolimits_r Z_r^p =
\frac{\bigcap_r (F^pK \cap d^{-1}(F^{p + r}K) + F^{p + 1}K)}{F^{p + 1}K}
$$
and
$$
B_\infty^p = \bigcup\nolimits_r B_r^p =
\frac{\bigcup_r (F^pK \cap d(F^{p - r + 1}K) + F^{p + 1}K)}{F^{p + 1}K}.
$$
exist, then $Z_\infty$ and $B_\infty$ exist with degree $p$ parts
$Z_\infty^p$ and $B_\infty^p$ (follows from an elementary argument
about unions and intersections of graded subobjects). Thus
$$
E_\infty^p =
\frac{\bigcap_r (F^pK \cap d^{-1}(F^{p + r}K) + F^{p + 1}K)}
{\bigcup_r (F^pK \cap d(F^{p - r + 1}K) + F^{p + 1}K)}.
$$
where the top and bottom exist. We have
\begin{equation}
\label{equation-on-top}
\Ker(d) \cap F^pK + F^{p + 1}K
\subset
\bigcap\nolimits_r \left(F^pK \cap d^{-1}(F^{p + r}K) + F^{p + 1}K\right)
\end{equation}
and
\begin{equation}
\label{equation-at-bottom}
\bigcup\nolimits_r \left(F^pK \cap d(F^{p - r + 1}K) + F^{p + 1}K\right)
\subset
\Im(d) \cap F^pK + F^{p + 1}K.
\end{equation}
Thus a subquotient of $E_\infty^p$ is
$$
\frac{\Ker(d) \cap F^pK + F^{p + 1}K}{\Im(d) \cap F^pK + F^{p + 1}K} =
\frac{\Ker(d) \cap F^pK}{\Im(d) \cap F^pK + \Ker(d) \cap F^{p + 1}K}
$$
Comparing with the formula given for $\text{gr}^pH(K)$ in the discussion
following
Definition \ref{definition-filtration-cohomology-filtered-differential}
we conclude.
\end{proof}

\begin{definition}
\label{definition-filtered-differential-ss-converges}
Let $\mathcal{A}$ be an abelian category.
Let $(K, F, d)$ be a filtered differential object of $\mathcal{A}$.
We say the spectral sequence associated to $(K, F, d)$
\begin{enumerate}
\item {\it weakly converges to $H(K)$} if $\text{gr}H(K) = E_{\infty}$
via Lemma \ref{lemma-compute-filtered-cohomology},
\item {\it abuts to $H(K)$} if it weakly converges to $H(K)$ and
we have $\bigcap F^pH(K) = 0$ and $\bigcup F^pH(K) = H(K)$,
\end{enumerate}
\end{definition}

\noindent
Unfortunately, it seems hard to find a consistent terminology for these
notions in the literature.

\begin{lemma}
\label{lemma-filtered-differential-ss-converges}
Let $\mathcal{A}$ be an abelian category.
Let $(K, F, d)$ be a filtered differential object of $\mathcal{A}$.
The associated spectral sequence
\begin{enumerate}
\item weakly converges to $H(K)$ if and only if for every
$p \in \mathbf{Z}$ we have equality in equations
(\ref{equation-at-bottom}) and (\ref{equation-on-top}),
\item abuts to $H(K)$ if and only if it weakly converges to $H(K)$ and
$\bigcap_p (\Ker(d) \cap F^pK + \Im(d)) = \Im(d)$
and $\bigcup_p (\Ker(d) \cap F^pK + \Im(d)) = \Ker(d)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from the discussions above.
\end{proof}














\section{Spectral sequences: filtered complexes}
\label{section-filtered-complex}

\begin{definition}
\label{definition-filtered-complex}
Let $\mathcal{A}$ be an abelian category.
A {\it filtered complex $K^\bullet$ of $\mathcal{A}$}
is a complex of $\text{Fil}(\mathcal{A})$ (see
Definition \ref{definition-filtered}).
\end{definition}

\noindent
We will denote the filtration on the objects by $F$. Thus
$F^pK^n$ denotes the $p$th step in the filtration of the $n$th term of the
complex. Note that each $F^pK^\bullet$ is a complex of $\mathcal{A}$.
Hence we could also have defined a filtered complex as a filtered object
in the (abelian) category of complexes of $\mathcal{A}$.
In particular $\text{gr} K^\bullet$ is a graded object of the
category of complexes of $\mathcal{A}$.

\medskip\noindent
To describe the spectral sequence associated to such an object
we assume, for the moment, that $\mathcal{A}$ is an abelian category
which has countable direct sums and countable direct sums are exact
(this is not automatic, see Remark \ref{remark-direct-sums-not-exact}).
Let us denote $d$ the differential of $K$. Forgetting the grading
we can think of $\bigoplus K^n$ as a filtered differential object of
$\mathcal{A}$. Hence according to Section \ref{section-filtered-differential}
we obtain a spectral sequence $(E_r, d_r)_{r \geq 0}$. In this section
we work out the terms of this spectral sequence, and we endow the terms
of this spectral sequence with additional structure coming from the
grading of $K$.

\medskip\noindent
First we point out that $E_0^p = \text{gr}^p K^\bullet$ is a
complex and hence is graded. Thus $E_0$ is bigraded in a natural
way. It is customary to use the bigrading
$$
E_0 = \bigoplus\nolimits_{p, q} E_0^{p, q},
\quad
E_0^{p, q} = \text{gr}^p K^{p + q}
$$
The idea is that $p + q$ should be thought of as the {\it total degree} of
the (co)homology classes. Also, $p$ is called the {\it filtration degree},
and $q$ is called the {\it complementary degree}.
The differential $d_0$ is compatible with this
bigrading in the following way
$$
d_0  = \bigoplus d_0^{p, q},
\quad
d_0^{p, q} : E_0^{p, q} \to E_0^{p, q + 1}.
$$
Namely, $d_0^p$ is just the differential on the complex
$\text{gr}^p K^\bullet$ (which occurs as $\text{gr}^pE_0$ just shifted
a bit).

\medskip\noindent
To go further we identify the objects $B_r^p$ and $Z_r^p$ introduced
in Section \ref{section-filtered-differential} as graded objects and
we work out the corresponding decompositions of the differentials.
We do this in a completely straightforward manner, but again we warn
the reader that our notation is not the same as notation found
elsewhere. We define
$$
Z_r^{p, q} =
\frac{F^pK^{p + q} \cap d^{-1}(F^{p + r}K^{p + q + 1}) + F^{p + 1}K^{p + q}}
{F^{p + 1}K^{p + q}}
$$
and
$$
B_r^{p, q} =
\frac{F^pK^{p + q} \cap d(F^{p - r + 1}K^{p + q - 1}) + F^{p + 1}K^{p + q}}
{F^{p + 1}K^{p + q}}
$$
and of course $E_r^{p, q} = Z_r^{p, q}/B_r^{p, q}$.
With these definitions it is completely clear that
$Z_r^p = \bigoplus_q Z_r^{p, q}$,
$B_r^p = \bigoplus_q B_r^{p, q}$, and
$E_r^p = \bigoplus_q E_r^{p, q}$. Moreover, we have
$$
0 \subset \ldots \subset B_r^{p, q} \subset
\ldots
\subset Z_r^{p, q} \subset \ldots \subset E_0^{p, q}
$$
Also, the map $d_r^p$ decomposes as the direct sum of the maps
$$
d_r^{p, q} : E_r^{p, q} \longrightarrow E_r^{p + r, q - r + 1},
\quad
z + F^{p + 1}K^{p + q}
\mapsto
dz + F^{p + r + 1}K^{p + q + 1}
$$
where $z \in F^pK^{p + q} \cap d^{-1}(F^{p + r}K^{p + q + 1})$.

\begin{lemma}
\label{lemma-spectral-sequence-filtered-complex}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a
filtered complex of $\mathcal{A}$. There is a spectral sequence
$(E_r, d_r)_{r \geq 0}$ in the category of bigraded objects of $\mathcal{A}$
associated to $(K^\bullet, F)$ such that $d_r$ has bidegree $(r, - r + 1)$
and such that $E_r$ has bigraded pieces $E_r^{p, q}$ and maps
$d_r^{p, q} : E_r^{p, q} \to E_r^{p + r, q - r + 1}$ as given above.
Furthermore, we have $E_0^{p, q} = \text{gr}^p(K^{p + q})$,
$d_0^{p, q} = \text{gr}^p(d^{p + q})$,
and $E_1^{p, q} = H^{p + q}(\text{gr}^p(K^\bullet))$.
\end{lemma}

\begin{proof}
If $\mathcal{A}$ has countable direct sums and if countable direct
sums are exact, then this follows from the discussion above.
In general, we proceed as follows; we strongly suggest the reader
skip this proof. Consider the bigraded object $A = (F^{p + 1}K^{p + 1 + q})$
of $\mathcal{A}$, i.e., we put $F^{p + 1}K^{p + 1 + q}$ in degree $(p, q)$
(the funny shift in numbering to get numbering correct later on).
We endow it with a differential $d : A \to A[0, 1]$ by using $d$
on each component. Then $(A, d)$ is a differential bigraded object.
Consider the map
$$
\alpha : A \to A[-1, 1]
$$
which is given in degree $(p, q)$ by the inclusion
$F^{p + 1}K^{p + 1 + q} \to F^pK^{p + 1 + q}$.
This is an injective morphism of differential objects
$\alpha : (A, d) \to (A, d)[-1, 1]$. Hence, we can apply
Remark \ref{remark-differential-object-selfmap}
with $S = [0, 1]$ and $T = [1, -1]$.
The corresponding spectral sequence $(E_r, d_r)_{r \geq 0}$
of bigraded objects is the spectral sequence we are looking
for. Let us unwind the definitions a bit. First of all we have
$E_r = (E_r^{p, q})$. Then, since $T^rS = [r, -r + 1]$
we have $d_r : E_r \to E_r[r, -r + 1]$ which means that
$d_r^{p, q} : E_r^{p, q} \to E_r^{p + r, q - r + 1}$.

\medskip\noindent
To see that the description of the graded pieces hold, we argue
as above. Namely, first we have
$$
E_0 = \Coker(\alpha : A \to A[-1, 1])[0, -1] =
\Coker(\alpha[0, -1] : A[0, -1] \to A[-1, 0])
$$
and by our choice of numbering above this gives
$$
E_0^{p, q} = \Coker(F^{p + 1}K^{p + q} \to F^pK^{p + q}) = \text{gr}^pK^{p + q}
$$
The first differential is given by
$d_0^{p, q} = \text{gr}^pd^{p + q} : E_0^{p, q} \to E_0^{p, q + 1}$.
Next, the description of the boundaries $B_r$ and the cocycles $Z_r$
in Remark \ref{remark-differential-object-selfmap}
translates into a straightforward manner into the formulae
for $Z_r^{p, q}$ and $B_r^{p, q}$ given above.
\end{proof}

\begin{lemma}
\label{lemma-spectral-sequence-filtered-complex-d1}
Let $\mathcal{A}$ be an abelian category.
Let $(K^\bullet, F)$ be a filtered complex of $\mathcal{A}$.
Assume $\mathcal{A}$ has countable direct sums.
Let $(E_r, d_r)_{r \geq 0}$ be the spectral sequence
associated to $(K^\bullet, F)$.
\begin{enumerate}
\item The map
$$
d_1^{p, q} :
E_1^{p, q} = H^{p + q}(\text{gr}^p(K^\bullet))
\longrightarrow
E_1^{p + 1, q} = H^{p + q + 1}(\text{gr}^{p + 1}(K^\bullet))
$$
is equal to the boundary map in cohomology associated to the short
exact sequence of complexes
$$
0 \to \text{gr}^{p + 1}(K^\bullet) \to
F^pK^\bullet/F^{p + 2}K^\bullet \to \text{gr}^p(K^\bullet) \to 0.
$$
\item Assume that $d(F^pK) \subset F^{p + 1}K$ for all $p \in \mathbf{Z}$.
Then $d$ induces the zero differential on $\text{gr}^p(K^\bullet)$
and hence
$E_1^{p, q} = \text{gr}^p(K^\bullet)^{p + q}$.
Furthermore, in this case
$$
d_1^{p, q} :
E_1^{p, q} = \text{gr}^p(K^\bullet)^{p + q}
\longrightarrow
E_1^{p + 1, q} = \text{gr}^{p + 1}(K^\bullet)^{p + q + 1}
$$
is the morphism induced by $d$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is clear from the formula given for the differential
$d_1^{p, q}$ just above Lemma \ref{lemma-spectral-sequence-filtered-complex}.
\end{proof}

\begin{lemma}
\label{lemma-spectral-sequence-filtered-complex-functorial}
Let $\mathcal{A}$ be an abelian category.
Let $\alpha : (K^\bullet, F) \to (L^\bullet, F)$ be a morphism of
filtered complexes of $\mathcal{A}$. Let $(E_r(K), d_r)_{r \geq 0}$,
resp.\ $(E_r(L), d_r)_{r \geq 0}$ be the spectral sequence associated
to $(K^\bullet, F)$, resp.\ $(L^\bullet, F)$.
The morphism $\alpha$ induces a canonical morphism of spectral
sequences $\{\alpha_r : E_r(K) \to E_r(L)\}_{r \geq 0}$ compatible
with the bigradings.
\end{lemma}

\begin{proof}
Obvious from the explicit representation of the terms of the
spectral sequences.
\end{proof}

\begin{definition}
\label{definition-filtration-cohomology-filtered-complex}
Let $\mathcal{A}$ be an abelian category.
Let $(K^\bullet, F)$ be a filtered complex of $\mathcal{A}$.
The {\it induced filtration} on $H^n(K^\bullet)$ is the filtration defined
by $F^pH^n(K^\bullet) = \Im(H^n(F^pK^\bullet) \to H^n(K^\bullet))$.
\end{definition}

\noindent
Writing out what this means we see that
\begin{equation}
\label{equation-filtration-cohomology}
F^pH^n(K^\bullet, d) =
\frac{\Ker(d) \cap F^pK^n + \Im(d) \cap K^n}{\Im(d) \cap K^n}
\end{equation}
and hence we see that
\begin{equation}
\label{equation-graded-cohomology}
\text{gr}^p H^n(K^\bullet) =
\frac{\Ker(d) \cap F^pK^n}{\Ker(d) \cap F^{p + 1}K^n + \Im(d) \cap F^pK^n}
\end{equation}
(one intermediate step omitted).

\begin{lemma}
\label{lemma-compute-cohomology-filtered-complex}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a filtered
complex of $\mathcal{A}$. If $Z_\infty^{p, q}$ and $B_\infty^{p, q}$ exist
(see proof), then
\begin{enumerate}
\item the limit $E_\infty$ exists and is a bigraded object having
$E_\infty^{p, q} = Z_\infty^{p, q}/B_\infty^{p, q}$ in bidegree $(p, q)$,
\item the $p$th graded part $\text{gr}^pH^n(K^\bullet)$ of the
$n$th cohomology object of $K^\bullet$ is a subquotient of
$E_\infty^{p, n - p}$.
\end{enumerate}
\end{lemma}

\begin{proof}
The objects $Z_\infty$, $B_\infty$, and the limit
$E_\infty = Z_\infty/B_\infty$ of
Definition \ref{definition-limit-spectral-sequence}
are bigraded objects of $\mathcal{A}$ by our construction of the
spectral sequence in Lemma \ref{lemma-spectral-sequence-filtered-complex}.
Since $Z_r^{p, q}$, resp.\ $B_r^{p, q}$ is the bidegree $(p, q)$
part of $Z_r$, resp.\ $B_r$, if we assume that
$$
Z_\infty^{p, q} = \bigcap\nolimits_r Z_r^{p, q} =
\bigcap\nolimits_r
\frac{F^pK^{p + q} \cap d^{-1}(F^{p + r}K^{p + q + 1}) + F^{p + 1}K^{p + q}}
{F^{p + 1}K^{p + q}}
$$
and
$$
B_\infty^{p, q} = \bigcup\nolimits_r B_r^{p, q} =
\bigcup\nolimits_r
\frac{F^pK^{p + q} \cap d(F^{p - r + 1}K^{p + q - 1}) + F^{p + 1}K^{p + q}}
{F^{p + 1}K^{p + q}}
$$
exist, then $Z_\infty$ and $B_\infty$ exist with bidegree $(p, q)$
parts $Z_\infty^{p, q}$ and $B_\infty^{p, q}$ (follows from an elementary
argument about unions and intersections of bigraded objects). Thus
$$
E_\infty^{p, q} =
\frac{\bigcap_r (F^pK^{p + q} \cap d^{-1}(F^{p + r}K^{p + q + 1})
+ F^{p + 1}K^{p + q})}
{\bigcup_r (F^pK^{p + q} \cap d(F^{p - r + 1}K^{p + q - 1})
+ F^{p + 1}K^{p + q})}.
$$
where the top and the bottom exist. With $n = p + q$ we have
\begin{equation}
\label{equation-on-top-bigraded}
\Ker(d) \cap F^pK^{n} + F^{p + 1}K^{n}
\subset
\bigcap\nolimits_r
\left(
F^pK^{n} \cap d^{-1}(F^{p + r}K^{n + 1}) + F^{p + 1}K^{n}
\right)
\end{equation}
and
\begin{equation}
\label{equation-at-bottom-bigraded}
\bigcup\nolimits_r
\left(
F^pK^{n} \cap d(F^{p - r + 1}K^{n - 1}) + F^{p + 1}K^{n}
\right)
\subset
\Im(d) \cap F^pK^{n} + F^{p + 1}K^{n}.
\end{equation}
Thus a subquotient of $E_\infty^{p, q}$ is
$$
\frac{\Ker(d) \cap F^pK^{n} + F^{p + 1}K^n}
{\Im(d) \cap F^pK^{n} + F^{p + 1}K^{n}} =
\frac{\Ker(d) \cap F^pK^n}{\Im(d) \cap F^pK^n + \Ker(d) \cap F^{p + 1}K^n}
$$
Comparing with (\ref{equation-graded-cohomology}) we conclude.
\end{proof}

\begin{definition}
\label{definition-bounded-ss}
Let $\mathcal{A}$ be an abelian category. Let $(E_r, d_r)_{r \geq r_0}$
be a spectral sequence of bigraded objects of
$\mathcal{A}$ with $d_r$ of bidegree $(r, -r + 1)$.
We say such a spectral sequence is
\begin{enumerate}
\item {\it regular} if for all $p, q \in \mathbf{Z}$ there is
a $b = b(p, q)$ such that the maps
$d_r^{p, q} : E_r^{p, q} \to E_r^{p + r, q - r + 1}$ are zero for $r \geq b$,
\item {\it coregular} if for all $p, q \in \mathbf{Z}$ there is a
$b = b(p, q)$ such that the maps
$d_r^{p - r, q + r - 1} : E_r^{p - r, q + r - 1} \to E_r^{p, q}$
are zero for $r \geq b$,
\item {\it bounded} if for all $n$
there are only a finite number of nonzero $E_{r_0}^{p, n - p}$,
\item {\it bounded below} if for all $n$ there is a $b = b(n)$ such that
$E_{r_0}^{p, n - p} = 0$ for $p \geq b$.
\item {\it bounded above} if for all $n$ there is a $b = b(n)$ such that
$E_{r_0}^{p, n - p} = 0$ for $p \leq b$.
\end{enumerate}
\end{definition}

\noindent
Bounded below means that if we look at $E_r^{p, q}$ on the line
$p + q = n$ (whose slope is $-1$) we obtain zeros as $(p, q)$
moves down and to the right.
As mentioned above there is no consistent terminology regarding
these notions in the literature.

\begin{lemma}
\label{lemma-relate-boundedness}
In the situation of Definition \ref{definition-bounded-ss}.
Let $Z_r^{p, q}, B_r^{p, q} \subset E_{r_0}^{p, q}$ be the
$(p, q)$-graded parts of $Z_r, B_r$ defined as in
Section \ref{section-spectral-sequence}.
\begin{enumerate}
\item The spectral sequence is regular if and only if for all $p, q$
there exists an $r = r(p, q)$ such that
$Z_r^{p, q} = Z_{r + 1}^{p, q} = \ldots$
\item The spectral sequence is coregular if and only if for all $p, q$
there exists an $r = r(p, q)$ such that
$B_r^{p, q} = B_{r + 1}^{p, q} = \ldots$
\item The spectral sequence is bounded if and only if it is both
bounded below and bounded above.
\item If the spectral sequence is bounded below, then it is regular.
\item If the spectral sequence is bounded above, then it is coregular.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: If $E_r^{p, q} = 0$, then we have $E_{r'}^{p, q} = 0$
for all $r' \geq r$.
\end{proof}

\begin{definition}
\label{definition-filtered-complex-ss-converges}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a
filtered complex of $\mathcal{A}$. We say the spectral sequence
associated to $(K^\bullet, F)$
\begin{enumerate}
\item {\it weakly converges to $H^*(K^\bullet)$} if
$\text{gr}^pH^n(K^\bullet) = E_{\infty}^{p, n - p}$
via Lemma \ref{lemma-compute-cohomology-filtered-complex}
for all $p, n \in \mathbf{Z}$,
\item {\it abuts to $H^*(K^\bullet)$} if it weakly converges to
$H^*(K^\bullet)$ and $\bigcap_p F^pH^n(K^\bullet) = 0$ and
$\bigcup_p F^p H^n(K^\bullet) = H^n(K^\bullet)$ for all $n$,
\item {\it converges to $H^*(K^\bullet)$} if it is regular,
abuts to $H^*(K^\bullet)$, and
$H^n(K^\bullet) = \lim_p H^n(K^\bullet)/F^pH^n(K^\bullet)$.
\end{enumerate}
\end{definition}

\noindent
Weak convergence, abutment, or convergence is symbolized by the notation
$E_r^{p, q} \Rightarrow H^{p + q}(K^\bullet)$.
As mentioned above there is no consistent terminology regarding
these notions in the literature.

\begin{lemma}
\label{lemma-filtered-complex-ss-converges}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a filtered
complex of $\mathcal{A}$. The associated spectral sequence
\begin{enumerate}
\item weakly converges to $H^*(K^\bullet)$ if and only if for every
$p, q \in \mathbf{Z}$ we have equality in equations
(\ref{equation-at-bottom-bigraded}) and (\ref{equation-on-top-bigraded}),
\item abuts to $H^*(K)$ if and only if it weakly converges to $H^*(K^\bullet)$
and we have
$\bigcap_p (\Ker(d) \cap F^pK^n + \Im(d) \cap K^n) = \Im(d) \cap K^n$
and
$\bigcup_p (\Ker(d) \cap F^pK^n + \Im(d) \cap K^n) = \Ker(d) \cap K^n$.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from the discussions above.
\end{proof}

\begin{lemma}
\label{lemma-biregular-ss-converges}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a
filtered complex of $\mathcal{A}$. Assume that the filtration on each $K^n$
is finite (see Definition \ref{definition-filtered}). Then
\begin{enumerate}
\item the spectral sequence associated to $(K^\bullet, F)$ is bounded,
\item the filtration on each $H^n(K^\bullet)$ is finite,
\item the spectral sequence associated to $(K^\bullet, F)$ converges
to $H^*(K^\bullet)$,
\item if $\mathcal{C} \subset \mathcal{A}$ is a weak Serre subcategory
and for some $r$ we have $E_r^{p, q} \in \mathcal{C}$ for all
$p, q \in \mathbf{Z}$, then $H^n(K^\bullet)$ is in $\mathcal{C}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) follows as $E_0^{p, n - p} = \text{gr}^p K^n$.
Part (2) is clear from Equation (\ref{equation-filtration-cohomology}).
We will use Lemma \ref{lemma-filtered-complex-ss-converges} to prove
that the spectral sequence weakly converges. Fix $p, n \in \mathbf{Z}$.
The right hand side of (\ref{equation-on-top-bigraded})
is equal to $F^pK^n \cap \Ker(d) + F^{p + 1}K^n$ because
$F^{p + r}K^n = 0$ for $r \gg 0$. Thus (\ref{equation-on-top-bigraded})
is an equality. The left hand side of (\ref{equation-at-bottom-bigraded})
is equal to $F^pK^n \cap \Im(d) + F^{p + 1}K^n$ because
$F^{p - r + 1}K^{n - 1} = K^{n - 1}$ for $r \gg 0$.
Thus (\ref{equation-at-bottom-bigraded}) is an equality. Since the filtration
on $H^n(K^\bullet)$ is finite by (2) we see that we have abutment.
To prove we have convergence we have to show the spectral sequence is
regular which follows as it is bounded
(Lemma \ref{lemma-relate-boundedness}) and we have
to show that $H^n(K^\bullet) = \lim_p H^n(K^\bullet)/F^pH^n(K^\bullet)$
which follows from the fact that the filtration on $H^*(K^\bullet)$
is finite proved in part (2).

\medskip\noindent
Proof of (4). Assume that for some $r \geq 0$ we have
$E_r^{p, q} \in \mathcal{C}$ for some weak Serre subcategory
$\mathcal{C}$ of $\mathcal{A}$. Then $E_{r + 1}^{p, q}$ is
in $\mathcal{C}$ as well, see
Lemma \ref{lemma-characterize-weak-serre-subcategory}.
By boundedness proved above (which implies that the spectral sequence
is both regular and coregular, see Lemma \ref{lemma-relate-boundedness})
we can find an $r' \geq r$ such that $E_\infty^{p, q} = E_{r'}^{p, q}$
for all $p, q$ with $p + q = n$. Thus $H^n(K^\bullet)$ is an object
of $\mathcal{A}$ which has a finite filtration whose graded pieces
are in $\mathcal{C}$. This implies that $H^n(K^\bullet)$ is in $\mathcal{C}$
by Lemma \ref{lemma-characterize-weak-serre-subcategory}.
\end{proof}

\begin{lemma}
\label{lemma-biregular-ss-relation-in-K0}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a
filtered complex of $\mathcal{A}$. Assume that the filtration on each $K^n$
is finite (see Definition \ref{definition-filtered}) and that for some
$r$ we have only a finite number of nonzero $E_r^{p, q}$. Then
only a finite number of $H^n(K^\bullet)$ are nonzero and we have
$$
\sum (-1)^n[H^n(K^\bullet)] = \sum (-1)^{p + q} [E_r^{p, q}]
$$
in $K_0(\mathcal{A}')$ where $\mathcal{A}'$ is the smallest weak
Serre subcategory of $\mathcal{A}$ containing the objects
$E_r^{p, q}$.
\end{lemma}

\begin{proof}
Denote $E_r^{even}$ and $E_r^{odd}$ the even and odd part of $E_r$
defined as the direct sum of the $(p, q)$ components with $p + q$ even
and odd. The differential $d_r$ defines maps
$\varphi : E_r^{even} \to E_r^{odd}$ and $\psi : E_r^{odd} \to E_r^{even}$
whose compositions either way give zero.
Then we see that
\begin{align*}
[E_r^{even}] - [E_r^{odd}] & =
[\Ker(\varphi)] + [\Im(\varphi)] - [\Ker(\psi)] - [\Im(\psi)] \\
& =
[\Ker(\varphi)/\Im(\psi)] - [\Ker(\psi)/\Im(\varphi)] \\
& =
[E_{r + 1}^{even}] - [E_{r + 1}^{odd}]
\end{align*}
Note that all the intervening objects are in the smallest Serre
subcategory containing the objects $E_r^{p, q}$.
Continuing in this manner we see that we can increase $r$ at will.
Since there are only a finite number of pairs $(p, q)$ for which
$E_r^{p, q}$ is nonzero, a property which is inherited by
$E_{r + 1}, E_{r + 2}, \ldots$, we see that we may assume that $d_r = 0$.
At this stage we see that $H^n(K^\bullet)$ has a finite filtration
(Lemma \ref{lemma-biregular-ss-converges}) whose graded pieces
are exactly the $E_r^{p, n - p}$ and the result is clear.
\end{proof}

\noindent
The following lemma is more a kind of sanity check for our definitions.
Surely, if we have a filtered complex such that for every $n$ we have
$$
H^n(F^pK^\bullet) = 0\text{ for }p \gg 0
\quad\text{and}\quad
H^n(F^pK^\bullet) = H^n(K^\bullet)\text{ for }p \ll 0,
$$
then the corresponding spectral sequence should converge?

\begin{lemma}
\label{lemma-ss-converges-trivial}
Let $\mathcal{A}$ be an abelian category. Let $(K^\bullet, F)$ be a
filtered complex of $\mathcal{A}$. Assume
\begin{enumerate}
\item for every $n$ there exist $p_0(n)$ such that
$H^n(F^pK^\bullet) = 0$ for $p \geq p_0(n)$,
\item for every $n$ there exist $p_1(n)$ such that
$H^n(F^pK^\bullet) \to H^n(K^\bullet)$ is an isomorphism
for $p \leq p_1(n)$.
\end{enumerate}
Then
\begin{enumerate}
\item the spectral sequence associated to $(K^\bullet, F)$ is bounded,
\item the filtration on each $H^n(K^\bullet)$ is finite,
\item the spectral sequence associated to $(K^\bullet, F)$ converges
to $H^*(K^\bullet)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Fix $n$. Using the long exact cohomology sequence associated to
the short exact sequence of complexes
$$
0 \to F^{p + 1}K^\bullet \to F^pK^\bullet \to \text{gr}^pK^\bullet \to 0
$$
we find that $E_1^{p, n - p} = 0$ for $p \geq \max(p_0(n), p_0(n + 1))$ and
$p < \min(p_1(n), p_1(n + 1))$. Hence the spectral sequence is bounded
(Definition \ref{definition-bounded-ss}). This proves (1).

\medskip\noindent
It is clear from the assumptions and
Definition \ref{definition-filtration-cohomology-filtered-complex}
that the filtration on $H^n(K^\bullet)$ is finite. This proves (2).

\medskip\noindent
Next we prove that the spectral sequence weakly converges to
$H^*(K^\bullet)$ using
Lemma \ref{lemma-filtered-complex-ss-converges}.
Let us show that we have equality in (\ref{equation-on-top-bigraded}).
Namely, for $p + r > p_0(n + 1)$ the map
$$
d : F^pK^{n} \cap d^{-1}(F^{p + r}K^{n + 1}) \to F^{p + r}K^{n + 1}
$$
ends up in the image of $d : F^{p + r}K^n \to F^{p + r}K^{n + 1}$
because the complex $F^{p + r}K^\bullet$ is exact in degree $n + 1$.
We conclude that $F^pK^{n} \cap d^{-1}(F^{p + r}K^{n + 1}) =
d(F^{p + r}K^n) + \Ker(d) \cap F^pK^n$. Hence for such $r$ we have
$$
\Ker(d) \cap F^pK^{n} + F^{p + 1}K^{n} =
F^pK^{n} \cap d^{-1}(F^{p + r}K^{n + 1}) + F^{p + 1}K^{n}
$$
which proves the desired equality. To show that we have equality in
(\ref{equation-at-bottom-bigraded}) we use that for $p - r + 1 < p_1(n - 1)$
we have
$$
d(F^{p - r + 1}K^{n - 1}) = \Im(d) \cap F^{p - r + 1}K^n
$$
because the map $F^{p - r + 1}K^\bullet \to K^\bullet$ induces an
isomorphism on cohomology in degree $n - 1$. This shows that
we have
$$
F^pK^{n} \cap d(F^{p - r + 1}K^{n - 1}) + F^{p + 1}K^{n} =
\Im(d) \cap F^pK^{n} + F^{p + 1}K^{n}
$$
for such $r$ which proves the desired equality.

\medskip\noindent
To see that the spectral sequence abuts to $H^*(K^\bullet)$ using
Lemma \ref{lemma-filtered-complex-ss-converges} we have to show that
$\bigcap_p (\Ker(d) \cap F^pK^n + \Im(d) \cap K^n) = \Im(d) \cap K^n$
and
$\bigcup_p (\Ker(d) \cap F^pK^n + \Im(d) \cap K^n) = \Ker(d) \cap K^n$.
For $p \geq p_0(n)$ we have
$\Ker(d) \cap F^pK^n + \Im(d) \cap K^n = \Im(d) \cap K^n$
and for $p \leq p_1(n)$ we have
$\Ker(d) \cap F^pK^n + \Im(d) \cap K^n = \Ker(d) \cap K^n$.
Combining weak convergence, abutment, and boundedness we see
that (2) and (3) are true.
\end{proof}






















\section{Spectral sequences: double complexes}
\label{section-double-complex}

\noindent
Let $K^{\bullet, \bullet}$ be a double complex, see
Section \ref{section-double-complexes}. It is customary to denote
$H^p_I(K^{\bullet, \bullet})$
the complex with terms $\Ker(d_1^{p, q})/\Im(d_1^{p - 1, q})$
(varying $q$) and differential induced by $d_2$.
Then $H^q_{II}(H^p_I(K^{\bullet, \bullet}))$ denotes its cohomology in
degree $q$. It is also customary to denote $H^q_{II}(K^{\bullet, \bullet})$
the complex with terms $\Ker(d_2^{p, q})/\Im(d_2^{p, q - 1})$
(varying $p$) and differential induced by $d_1$.
Then $H^p_I(H^q_{II}(K^{\bullet, \bullet}))$ denotes its cohomology in
degree $p$. It will turn out that these cohomology groups show up
as the terms in the spectral sequence for a filtration on the
associated total complex or simple complex, see
Definition \ref{definition-associated-simple-complex}.

\medskip\noindent
There are two natural filtrations on the total complex
$\text{Tot}(K^{\bullet, \bullet})$
associated to the double complex $K^{\bullet, \bullet}$. Namely, we
define
$$
F_I^p(\text{Tot}^n(K^{\bullet, \bullet})) =
\bigoplus\nolimits_{i + j = n, \ i \geq p} K^{i, j}
\quad
\text{and}
\quad
F_{II}^p(\text{Tot}^n(K^{\bullet, \bullet})) =
\bigoplus\nolimits_{i + j = n, \ j \geq p} K^{i, j}.
$$
It is immediately verified that $(\text{Tot}(K^{\bullet, \bullet}), F_I)$ and
$(\text{Tot}(K^{\bullet, \bullet}), F_{II})$ are filtered complexes.
By Section \ref{section-filtered-complex}
we obtain two spectral sequences. It is customary to
denote $({}'E_r, {}'d_r)_{r \geq 0}$ the spectral sequence associated
to the filtration $F_I$ and to denote $({}''E_r, {}''d_r)_{r \geq 0}$
the spectral sequence associated to the filtration $F_{II}$.
Here is a description of these spectral sequences.

\begin{lemma}
\label{lemma-ss-double-complex}
Let $\mathcal{A}$ be an abelian category.
Let $K^{\bullet, \bullet}$ be a double complex.
The spectral sequences associated to $K^{\bullet, \bullet}$
have the following terms:
\begin{enumerate}
\item ${}'E_0^{p, q} = K^{p, q}$ with
${}'d_0^{p, q} = (-1)^p d_2^{p, q} : K^{p, q} \to K^{p, q + 1}$,
\item ${}''E_0^{p, q} = K^{q, p}$ with
${}''d_0^{p, q} = d_1^{q, p} : K^{q, p} \to K^{q + 1, p}$,
\item ${}'E_1^{p, q} = H^q(K^{p, \bullet})$ with
${}'d_1^{p, q} = H^q(d_1^{p, \bullet})$,
\item ${}''E_1^{p, q} = H^q(K^{\bullet, p})$ with
${}''d_1^{p, q} = (-1)^q H^q(d_2^{\bullet, p})$,
\item ${}'E_2^{p, q} = H^p_I(H^q_{II}(K^{\bullet, \bullet}))$,
\item ${}''E_2^{p, q} = H^p_{II}(H^q_I(K^{\bullet, \bullet}))$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
These spectral sequences define two filtrations on
$H^n(\text{Tot}(K^{\bullet, \bullet}))$.
We will denote these $F_I$ and $F_{II}$.

\begin{definition}
\label{definition-ss-double-complex-converge}
Let $\mathcal{A}$ be an abelian category.
Let $K^{\bullet, \bullet}$ be a double complex.
We say the spectral sequence $({}'E_r, {}'d_r)_{r \geq 0}$
{\it weakly converges to $H^n(\text{Tot}(K^{\bullet, \bullet}))$},
{\it abuts to $H^n(\text{Tot}(K^{\bullet, \bullet}))$}, or
{\it converges to $H^n(\text{Tot}(K^{\bullet, \bullet}))$}
if Definition \ref{definition-filtered-complex-ss-converges} applies.
Similarly we say the spectral sequence $({}''E_r, {}''d_r)_{r \geq 0}$
{\it weakly converges to $H^n(\text{Tot}(K^{\bullet, \bullet}))$},
{\it abuts to $H^n(\text{Tot}(K^{\bullet, \bullet}))$}, or
{\it converges to $H^n(\text{Tot}(K^{\bullet, \bullet}))$}
if Definition \ref{definition-filtered-complex-ss-converges} applies.
\end{definition}

\noindent
As mentioned above there is no consistent terminology regarding these
notions in the literature. In the situation of the definition, we have
weak convergence of the first spectral sequence if for all $n$
$$
\text{gr}_{F_I}(H^n(\text{Tot}(K^{\bullet, \bullet}))) =
\oplus_{p + q = n} {}'E_\infty^{p, q}
$$
via the canonical comparison of
Lemma \ref{lemma-compute-cohomology-filtered-complex}.
Similarly the second spectral sequence $({}''E_r, {}''d_r)_{r \geq 0}$
weakly converges if for all $n$
$$
\text{gr}_{F_{II}}(H^n(\text{Tot}(K^{\bullet, \bullet}))) =
\oplus_{p + q = n} {}''E_\infty^{p, q}
$$
via the canonical comparison of
Lemma \ref{lemma-compute-cohomology-filtered-complex}.

\begin{lemma}
\label{lemma-first-quadrant-ss}
Let $\mathcal{A}$ be an abelian category. Let $K^{\bullet, \bullet}$
be a double complex. Assume that for every $n \in \mathbf{Z}$ there are
only finitely many nonzero $K^{p, q}$ with $p + q = n$. Then
\begin{enumerate}
\item the two spectral sequences associated to $K^{\bullet, \bullet}$
are bounded,
\item the filtrations $F_I$, $F_{II}$ on each
$H^n(\text{Tot}(K^{\bullet, \bullet}))$ are finite,
\item the spectral sequences $({}'E_r, {}'d_r)_{r \geq 0}$ and
$({}''E_r, {}''d_r)_{r \geq 0}$ converge to
$H^*(\text{Tot}(K^{\bullet, \bullet}))$,
\item if $\mathcal{C} \subset \mathcal{A}$ is a weak Serre subcategory
and for some $r$ we have ${}'E_r^{p, q} \in \mathcal{C}$ for all
$p, q \in \mathbf{Z}$, then $H^n(\text{Tot}(K^{\bullet, \bullet}))$
is in $\mathcal{C}$. Similarly for $({}''E_r, {}''d_r)_{r \geq 0}$.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows immediately from Lemma \ref{lemma-biregular-ss-converges}.
\end{proof}

\noindent
Here is our first application of spectral sequences.

\begin{lemma}
\label{lemma-double-complex-gives-resolution}
Let $\mathcal{A}$ be an abelian category.
Let $K^\bullet$ be a complex.
Let $A^{\bullet, \bullet}$ be a double complex.
Let $\alpha^p : K^p \to A^{p, 0}$ be morphisms.
Assume that
\begin{enumerate}
\item For every $n \in \mathbf{Z}$ there are only finitely many nonzero
$A^{p, q}$ with $p + q = n$.
\item We have $A^{p, q} = 0$ if $q < 0$.
\item The morphisms $\alpha^p$ give rise to a morphism
of complexes $\alpha : K^\bullet \to A^{\bullet, 0}$.
\item The complex $A^{p, \bullet}$ is exact in all degrees
$q \not = 0$ and the morphism $K^p \to A^{p, 0}$ induces
an isomorphism $K^p \to \Ker(d_2^{p, 0})$.
\end{enumerate}
Then $\alpha$ induces a quasi-isomorphism
$$
K^\bullet \longrightarrow \text{Tot}(A^{\bullet, \bullet})
$$
of complexes.
Moreover, there is a variant of this lemma involving the second
variable $q$ instead of $p$.
\end{lemma}

\begin{proof}
The map is simply the map given by the morphisms
$K^n \to A^{n, 0} \to \text{Tot}^n(A^{\bullet, \bullet})$,
which are easily seen to define a morphism of complexes.
Consider the spectral sequence $({}'E_r, {}'d_r)_{r \geq 0}$
associated to the double complex $A^{\bullet, \bullet}$.
By Lemma \ref{lemma-first-quadrant-ss} this spectral sequence converges
and the induced filtration on $H^n(\text{Tot}(A^{\bullet, \bullet}))$
is finite for each $n$.
By Lemma \ref{lemma-ss-double-complex} and assumption (4) we have
${}'E_1^{p, q} = 0$ unless $q = 0$ and $'E_1^{p, 0} = K^p$
with differential ${}'d_1^{p, 0}$ identified with $d_K^p$.
Hence ${}'E_2^{p, 0} = H^p(K^\bullet)$ and zero otherwise.
This clearly implies ${}'d_2^{p, q} = {}'d_3^{p, q} = \ldots = 0$
for degree reasons. Hence we conclude that
$H^n(\text{Tot}(A^{\bullet, \bullet})) = H^n(K^\bullet)$.
We omit the verification that this identification is given by the
morphism of complexes $K^\bullet \to \text{Tot}(A^{\bullet, \bullet})$
introduced above.
\end{proof}

\begin{lemma}
\label{lemma-homotopy-complex-complexes}
Let $\mathcal{A}$ be an abelian category.
Let $M^\bullet$ be a complex of $\mathcal{A}$. Let
$$
a :
M^\bullet[0]
\longrightarrow
\left(A^{0, \bullet} \to A^{1, \bullet} \to A^{2, \bullet} \to \ldots \right)
$$
be a homotopy equivalence in the category of complexes of complexes
of $\mathcal{A}$. Then the map
$\alpha : M^\bullet \to \text{Tot}(A^{\bullet, \bullet})$
induced by $M^\bullet \to A^{0, \bullet}$ is a homotopy equivalence.
\end{lemma}

\begin{proof}
The statement makes sense as a complex of complexes is the same thing
as a double complex. The assumption means there is a map
$$
b :
\left(A^{0, \bullet} \to A^{1, \bullet} \to A^{2, \bullet} \to \ldots \right)
\longrightarrow
M^\bullet[0]
$$
such that $a \circ b$ and $b \circ a$ are homotopic to the identity
in the category of complexes of complexes. This means that $b \circ a$
is the identity of $M^\bullet[0]$ (because there is only one term in
degree $0$). Also, observe that $b$ is given by a map
$b^0 : A^{0, \bullet} \to M^\bullet$ and zero in all other degrees.
Thus $b$ induces a map
$\beta : \text{Tot}(A^{\bullet, \bullet}) \to M^\bullet$
and $\beta \circ \alpha$ is the identity on $M^\bullet$.
Finally, we have to show that the map
$\alpha \circ \beta$ is homotopic to the identity.
For this we choose maps of complexes
$h^n : A^{n, \bullet} \to A^{n - 1, \bullet}$
such that $a \circ b - \text{id} = d_1 \circ h + h \circ d_1$
which exist by assumption. Here $d_1 : A^{n, \bullet} \to A^{n + 1, \bullet}$
are the differentials of the complex of complexes. We will also
denote $d_2$ the differentials of the complexes $A^{n, \bullet}$
for all $n$. Let $h^{n, m} : A^{n, m} \to A^{n - 1, m}$ be the components of
$h^n$. Then we can consider
$$
h' : \text{Tot}(A^{\bullet, \bullet})^k =
\bigoplus\nolimits_{n + m = k} A^{n, m}
\to
\bigoplus\nolimits_{n + m = k - 1} A^{n, m} =
\text{Tot}(A^{\bullet, \bullet})^{k - 1}
$$
given by $h^{n, m}$ on the summand $A^{n, m}$. Then we compute
that the map
$$
d_{\text{Tot}(A^{\bullet, \bullet})} \circ h' +
h' \circ d_{\text{Tot}(A^{\bullet, \bullet})}
$$
restricted to the summand $A^{n, m}$ is equal to
$$
d_1^{n - 1, m} \circ h^{n, m} +
(-1)^{n - 1} d_2^{n - 1, m} \circ h^{n, m} +
h^{n + 1, m} \circ d_1^{n, m} + h^{n, m + 1} \circ (-1)^nd_2^{n, m}
$$
Since $h^n$ is a map of complexes, the terms
$(-1)^{n - 1} d_2^{n - 1, m} \circ h^{n, m}$ and
$h^{n, m + 1} \circ (-1)^nd_2^{n, m}$ cancel.
The other two terms give
$(\alpha \circ \beta)|_{A^{n, m}} - \text{id}_{A^{n, m}}$
because $a \circ b - \text{id} = d_1 \circ h + h \circ d_1$.
This finishes the proof.
\end{proof}








\section{Double complexes of abelian groups}
\label{section-double-complexes-abelian-groups}

\noindent
In this section we put some results on double complexes of abelian groups
for which do not (yet) have the analogues results for general abelian
categories. Please be careful not to use these lemmas except when the
underlying abelian category is the category of abelian groups or some
such (e.g., the category of modules over a ring). Some of the arguments
will be difficult to follow without drawing ``zig-zags'' on a napkin --
compare with the proof of
Algebra, Lemma \ref{algebra-lemma-no-spectral-sequence}.

\begin{lemma}
\label{lemma-right-resolution-gives-qis}
Let $M^\bullet$ be a complex of abelian groups. Let
$$
0 \to M^\bullet \to A_0^\bullet \to A_1^\bullet \to A_2^\bullet \to \ldots
$$
be an exact complex of complexes of abelian groups. Set
$A^{p, q} = A_p^q$ to obtain a double complex.
Then the map $M^\bullet \to \text{Tot}(A^{\bullet, \bullet})$
induced by $M^\bullet \to A_0^\bullet$ is a quasi-isomorphism.
\end{lemma}

\begin{proof}
If there exists a $t \in \mathbf{Z}$ such that $A_0^q = 0$ for $q < t$, then
this follows immediately from
Lemma \ref{lemma-double-complex-gives-resolution}
(with $p$ and $q$ swapped as in the final statement of that lemma).
OK, but for every $t \in \mathbf{Z}$ we have a complex
$$
0 \to
\sigma_{\geq t}M^\bullet \to
\sigma_{\geq t}A_0^\bullet \to
\sigma_{\geq t}A_1^\bullet \to
\sigma_{\geq t}A_2^\bullet \to \ldots
$$
of stupid truncations. Denote $A(t)^{\bullet, \bullet}$ the corresponding
double complex. Every element $\xi$ of $H^n(\text{Tot}(A^{\bullet, \bullet}))$
is the image of an element of $H^n(\text{Tot}(A(t)^{\bullet, \bullet}))$
for some $t$ (look at explicit representatives of cohomology classes).
Hence $\xi$ is in the image of $H^n(\sigma_{\geq t}M^\bullet)$.
Thus the map $H^n(M^\bullet) \to H^n(\text{Tot}(A^{\bullet, \bullet}))$
is surjective. It is injective because for all $t$ the map
$H^n(\sigma_{\geq t}M^\bullet) \to H^n(\text{Tot}(A(t)^{\bullet, \bullet}))$
is injective and similar arguments.
\end{proof}

\begin{lemma}
\label{lemma-good-resolution-gives-qis}
Let $M^\bullet$ be a complex of abelian groups. Let
$$
\ldots \to A_2^\bullet \to A_1^\bullet \to A_0^\bullet \to M^\bullet \to 0
$$
be an exact complex of complexes of abelian groups such that for all
$p \in \mathbf{Z}$ the complexes
$$
\ldots \to \Ker(d_{A_2^\bullet}^p) \to \Ker(d_{A_1^\bullet}^p)
\to \Ker(d_{A_0^\bullet}^p) \to \Ker(d_{M^\bullet}^p) \to 0
$$
are exact as well. Set $A^{p, q} = A_{-p}^q$ to obtain a double
complex. Then $\text{Tot}(A^{\bullet, \bullet}) \to M^\bullet$
induced by $A_0^\bullet \to M^\bullet$ is a quasi-isomorphism.
\end{lemma}

\begin{proof}
Using the short exact sequences
$0 \to \Ker(d^p_{A_n^\bullet}) \to A_n^p \to \Im(d^p_{A_n^\bullet}) \to 0$
and the assumptions we see that
$$
\ldots \to \Im(d_{A_2^\bullet}^p) \to \Im(d_{A_1^\bullet}^p)
\to \Im(d_{A_0^\bullet}^p) \to \Im(d_{M^\bullet}^p) \to 0
$$
is exact for all $p \in \mathbf{Z}$. Repeating with the exact sequences
$0 \to \Im(d^{p - 1}_{A_n^\bullet}) \to \Ker(d^p_{A_n^\bullet})
\to H^p(A_n^\bullet) \to 0$ we find that
$$
\ldots \to H^p(A_2^\bullet) \to H^p(A_1^\bullet)
\to H^p(A_0^\bullet) \to H^p(M^\bullet) \to 0
$$
is exact for all $p \in \mathbf{Z}$.

\medskip\noindent
Write $T^\bullet = \text{Tot}(A^{\bullet, \bullet})$. We will show that
$H^0(T^\bullet) \to H^0(M^\bullet)$ is an isomorphism. The same argument
works for other degrees. Let $x \in \Ker(\text{d}_{T^\bullet}^0)$ represent
an element $\xi \in H^0(T^\bullet)$.
Write $x = \sum_{i = n, \ldots, 0} x_i$ with $x_i \in A_i^i$.
Assume $n > 0$. Then $x_n$ is in the kernel of $d_{A_n^\bullet}^n$
and maps to zero in $H^n(A_{n - 1}^\bullet)$ because it maps
to an element which is the boundary of $x_{n - 1}$ up to sign.
By the first paragraph of the proof, we find that
$x_n \bmod \Im(d^{n - 1}_{A_n^\bullet})$
is in the image of $H^n(A_{n + 1}^\bullet) \to H^n(A_n^\bullet)$.
Thus we can modify $x$ by a boundary and reach the situation
where $x_n$ is a boundary. Modifying $x$ once more we see that
we may assume $x_n = 0$. By induction we see that every cohomology
class $\xi$ is represented by a cocycle $x = x_0$.
Finally, the condition on exactness of kernels tells us
two such cocycles $x_0$ and $x_0'$ are cohomologous if
and only if their image in $H^0(M^\bullet)$ are the same.
\end{proof}

\begin{lemma}
\label{lemma-good-right-resolution-gives-qis}
Let $M^\bullet$ be a complex of abelian groups. Let
$$
0 \to M^\bullet \to A_0^\bullet \to A_1^\bullet \to A_2^\bullet \to \ldots
$$
be an exact complex of complexes of abelian groups
such that for all $p \in \mathbf{Z}$ the complexes
$$
0 \to
\Coker(d_{M^\bullet}^p) \to
\Coker(d_{A_0^\bullet}^p) \to
\Coker(d_{A_1^\bullet}^p) \to
\Coker(d_{A_2^\bullet}^p) \to \ldots
$$
are exact as well. Set $A^{p, q} = A_p^q$ to obtain a double
complex. Let $\text{Tot}_\pi(A^{\bullet, \bullet})$ be the
product total complex associated to the double complex
(see proof). Then the map
$M^\bullet \to \text{Tot}_\pi(A^{\bullet, \bullet})$
induced by $M^\bullet \to A_0^\bullet$ is a quasi-isomorphism.
\end{lemma}

\begin{proof}
Abbreviating $T^\bullet = \text{Tot}_\pi(A^{\bullet, \bullet})$
we define
$$
T^n = \prod\nolimits_{p + q = n} A^{p, q} =
\prod\nolimits_{p + q = n} A_p^q
\quad\text{with}\quad
\text{d}_{T^\bullet}^n =
\prod\nolimits_{n = p + q} (f_p^q + (-1)^pd_{A_p^\bullet}^q)
$$
where $f_p^\bullet : A_p^\bullet \to A_{p + 1}^\bullet$
are the maps of complexes in the lemma.

\medskip\noindent
We will show that $H^0(M^\bullet) \to H^0(T^\bullet)$ is an isomorphism.
The same argument works for other degrees.
Let $x \in \Ker(\text{d}_{T^\bullet}^0)$ represent $\xi \in H^0(T^\bullet)$.
Write $x = (x_i)$ with $x_i \in A_i^{-i}$.
Note that $x_0$ maps to zero in $\Coker(A_1^{-1} \to A_1^0)$.
Hence we see that $x_0 = m_0 + d_{A_0^\bullet}^{-1}(y)$ for some
$m_0 \in M^0$ and $y \in A_0^{-1}$.
Then $d_{M^\bullet}(m_0) = 0$ because $\text{d}_{A_0^\bullet}(x_0) = 0$
as $\text{d}_{T^\bullet}(x) = 0$.
Thus, replacing $\xi$ by something in the image of
$H^0(M^\bullet) \to H^0(T^\bullet)$ we may assume that $x_0$
is in $\Im(d^{-1}_{A_0^\bullet})$.

\medskip\noindent
Assume $x_0 \in \Im(d^{-1}_{A_0^\bullet})$. We claim that in this
case $\xi = 0$. To prove this we find, by induction on $n$ elements
$y_0, y_1, \ldots, y_n$ with $y_i \in A_i^{-i - 1}$ such that
$x_0 = \text{d}_{A_0}^{-1}(y_0)$ and
$x_j = f_{j - 1}^{-j}(y_{j - 1}) + (-1)^j d^{-j - 1}_{A_j^\bullet}(y_j)$
for $j = 1, \ldots, n$. This is clear for $n = 0$. Proof of induction step:
suppose we have found $y_0, \ldots, y_{n - 1}$. Then
$w_n = x_n - f_{n - 1}^{-n}(y_{n - 1})$ is in the kernel of
$d^{-n}_{A_n^\bullet}$ and maps to zero in $H^{-n}(A_{n + 1}^\bullet)$
(because it maps to an element which is the boundary
of $x_{n + 1}$ up to sign). Exactly as in the proof of
Lemma \ref{lemma-good-resolution-gives-qis}
the assumptions of the lemma imply that
$$
0 \to
H^p(M^\bullet) \to
H^p(A_0^\bullet) \to
H^p(A_1^\bullet) \to
H^p(A_2^\bullet) \to \ldots
$$
is exact for all $p \in \mathbf{Z}$. Thus after changing $y_{n - 1}$
by an element in $\Ker(d^{n - 1}_{A_{n - 1}^\bullet})$ we may assume
that $w_n$ maps to zero in $H^{-n}(A_n^\bullet)$. This means we
can find $y_n$ as desired. Observe that this procedure does not
change $y_0, \ldots, y_{n - 2}$. Hence continuing ad infinitum
we find an element $y = (y_i)$ in $T^{n - 1}$ with $d_{T^\bullet}(y) = \xi$.
This shows that $H^0(M^\bullet) \to H^0(T^\bullet)$ is surjective.

\medskip\noindent
Suppose that $m_0 \in \Ker(d^0_{M^\bullet})$ maps to zero in $H^0(T^\bullet)$.
Say it maps to the differential applied to $y = (y_i) \in T^{-1}$ .
Then $y_0 \in A_0^{-1}$ maps to zero in $\Coker(d^{-2}_{A_1^\bullet})$.
By assumption this means that $y_0 \bmod \Im(d^{-2}_{A_0^\bullet})$
is the image of some $z \in M^{-1}$. It follows that
$m_0 = d^{-1}_{M^\bullet}(z)$. This proves injectivity and the proof is
complete.
\end{proof}

\begin{lemma}
\label{lemma-resolution-gives-qis}
Let $M^\bullet$ be a complex of abelian groups. Let
$$
\ldots \to A_2^\bullet \to A_1^\bullet \to A_0^\bullet \to M^\bullet \to 0
$$
be an exact complex of complexes of abelian groups. Set $A^{p, q} = A_{-p}^q$
to obtain a double complex. Let $\text{Tot}_\pi(A^{\bullet, \bullet})$
be the product total complex associated to the double complex (see proof).
Then the map $\text{Tot}_\pi(A^{\bullet, \bullet}) \to M^\bullet$
induced by $A_0^\bullet \to M^\bullet$ is a quasi-isomorphism.
\end{lemma}

\begin{proof}
Abbreviating $T^\bullet = \text{Tot}_\pi(A^{\bullet, \bullet})$
we define
$$
T^n = \prod\nolimits_{p + q = n} A^{p, q} =
\prod\nolimits_{p + q = n} A_{-p}^q
\quad\text{with}\quad
\text{d}_{T^\bullet}^n =
\prod\nolimits_{n = p + q} (f_{-p}^q + (-1)^pd_{A_{-p}^\bullet}^q)
$$
where $f_p^\bullet : A_p^\bullet \to A_{p - 1}^\bullet$
are the maps of complexes in the lemma.
We will show that $T^\bullet$ is acyclic when
$M^\bullet$ is the zero complex. This will suffice by
the following trick. Set $B_n^\bullet = A_{n + 1}^\bullet$
and $B_0^\bullet = M^\bullet$. Then we have an exact sequence
$$
\ldots \to B_2^\bullet \to B_1^\bullet \to B_0^\bullet \to 0 \to 0
$$
as in the lemma. Let $S^\bullet = \text{Tot}_\pi(B^{\bullet, \bullet})$.
Then there is an obvious short exact sequence of complexes
$$
0 \to M^\bullet \to S^\bullet \to T^\bullet[1] \to 0
$$
and we conclude by the long exact cohomology sequence. Some details omitted.

\medskip\noindent
Assume $M^\bullet = 0$. We will show $H^0(T^\bullet) = 0$. The same argument
works for other degrees. Let $x =(x_n) \in \Ker(d_{T^\bullet})$
map to $\xi \in H^0(T^\bullet)$ with $x_n \in A^{-n, n} = A_n^n$.
Since $M^0 = 0$ we find that $x_0 = f_1^0(y_0)$ for some $y_0 \in A_1^0$.
Then $x_1 - d^0_{A_1^\bullet}(y_0) = f_2^1(y_1)$
because it is mapped to zero by $f_1^1$ as $x$ is a cocycle.
for some $y_1 \in A_2^1$. Continuing, using induction, we find
$y = (y_i) \in T^{-1}$ with $d_{T^\bullet}(y) = x$ as desired.
\end{proof}







\section{Injectives}
\label{section-injectives}

\begin{definition}
\label{definition-injective}
Let $\mathcal{A}$ be an abelian category.
An object $J \in \Ob(\mathcal{A})$ is
called {\it injective} if for every injection
$A \hookrightarrow B$ and every morphism
$A \to J$ there exists a morphism $B \to J$ making
the following diagram commute
$$
\xymatrix{
A \ar[r] \ar[d] & B \ar@{-->}[ld] \\
J &
}
$$
\end{definition}

\noindent
Here is the obligatory characterization of injective objects.

\begin{lemma}
\label{lemma-characterize-injectives}
Let $\mathcal{A}$ be an abelian category.
Let $I$ be an object of $\mathcal{A}$.
The following are equivalent:
\begin{enumerate}
\item The object $I$ is injective.
\item The functor $B \mapsto \Hom_\mathcal{A}(B, I)$
is exact.
\item Any short exact sequence
$$
0 \to I \to A \to B \to 0
$$
in $\mathcal{A}$ is split.
\item We have $\Ext_\mathcal{A}(B, I) = 0$ for
all $B \in \Ob(\mathcal{A})$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-product-injectives}
Let $\mathcal{A}$ be an abelian category.
Suppose $I_\omega$, $\omega \in \Omega$ is a set of injective
objects of $\mathcal{A}$. If $\prod_{\omega \in \Omega} I_\omega$
exists then it is injective.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-enough-injectives}
Let $\mathcal{A}$ be an abelian category.
We say $\mathcal{A}$ has {\it enough injectives}
if every object $A$ has an injective morphism
$A \to J$ into an injective object $J$.
\end{definition}

\begin{definition}
\label{definition-functorial-injective-embedding}
Let $\mathcal{A}$ be an abelian category.
We say that $\mathcal{A}$ has {\it functorial injective embeddings}
if there exists a functor
$$
J : \mathcal{A} \longrightarrow \text{Arrows}(\mathcal{A})
$$
such that
\begin{enumerate}
\item $s \circ J = \text{id}_\mathcal{A}$,
\item for any object $A \in \Ob(\mathcal{A})$
the morphism $J(A)$ is injective, and
\item for any object $A \in \Ob(\mathcal{A})$
the object $t(J(A))$ is an injective object of $\mathcal{A}$.
\end{enumerate}
We will denote such a functor by
$A \mapsto (A \to J(A))$.
\end{definition}





\section{Projectives}
\label{section-projectives}

\begin{definition}
\label{definition-projective}
Let $\mathcal{A}$ be an abelian category.
An object $P \in \Ob(\mathcal{A})$ is
called {\it projective} if for every surjection
$A \rightarrow B$ and every morphism
$P \to B$ there exists a morphism $P \to A$ making
the following diagram commute
$$
\xymatrix{
A \ar[r] & B \\
P \ar@{-->}[u] \ar[ru] &
}
$$
\end{definition}

\noindent
Here is the obligatory characterization of projective objects.

\begin{lemma}
\label{lemma-characterize-projectives}
Let $\mathcal{A}$ be an abelian category.
Let $P$ be an object of $\mathcal{A}$.
The following are equivalent:
\begin{enumerate}
\item The object $P$ is projective.
\item The functor $B \mapsto \Hom_\mathcal{A}(P, B)$
is exact.
\item Any short exact sequence
$$
0 \to A \to B \to P \to 0
$$
in $\mathcal{A}$ is split.
\item We have $\Ext_\mathcal{A}(P, A) = 0$ for
all $A \in \Ob(\mathcal{A})$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-coproduct-projectives}
Let $\mathcal{A}$ be an abelian category.
Suppose $P_\omega$, $\omega \in \Omega$ is a set of projective
objects of $\mathcal{A}$. If $\coprod_{\omega \in \Omega} P_\omega$
exists then it is projective.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-enough-projectives}
Let $\mathcal{A}$ be an abelian category.
We say $\mathcal{A}$ has {\it enough projectives}
if every object $A$ has an surjective morphism
$P \to A$ from an projective object $P$ onto it.
\end{definition}

\begin{definition}
\label{definition-functorial-projective-surjections}
Let $\mathcal{A}$ be an abelian category.
We say that $\mathcal{A}$ has {\it functorial projective surjections}
if there exists a functor
$$
P : \mathcal{A} \longrightarrow \text{Arrows}(\mathcal{A})
$$
such that
\begin{enumerate}
\item $t \circ P = \text{id}_\mathcal{A}$,
\item for any object $A \in \Ob(\mathcal{A})$
the morphism $P(A)$ is surjective, and
\item for any object $A \in \Ob(\mathcal{A})$
the object $s(P(A))$ is an projective object of $\mathcal{A}$.
\end{enumerate}
We will denote such a functor by
$A \mapsto (P(A) \to A)$.
\end{definition}

















\section{Injectives and adjoint functors}
\label{section-adjoint}

\noindent
Here are some lemmas on adjoint functors and their relationship with
injectives. See also Lemma \ref{lemma-adjoint-get-abelian}.

\begin{lemma}
\label{lemma-adjoint-preserve-injectives}
\begin{slogan}
A functor with an exact left adjoint preserves injectives
\end{slogan}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $u : \mathcal{A} \to \mathcal{B}$ and
$v : \mathcal{B} \to \mathcal{A}$ be additive functors with
$u$ right adjoint to $v$. Consider the following conditions:
\begin{enumerate}
\item[(a)] $v$ transforms injective maps into injective maps,
\item[(b)] $v$ is exact, and
\item[(c)] $u$ transforms injectives into injectives.
\end{enumerate}
Then (a) $\Leftrightarrow$ (b) $\Rightarrow$ (c). If $\mathcal{A}$
has enough injectives, then all three conditions are equivalent.
\end{lemma}

\begin{proof}
Observe that $v$ is right exact as a left adjoint (Categories, Lemma
\ref{categories-lemma-exact-adjoint}). Combined with
Lemma \ref{lemma-exact-functor} this explains why (a) $\Leftrightarrow$ (b).

\medskip\noindent
Assume (a). Let $I$ be an injective object of $\mathcal{A}$.
Let $\varphi : N \to M$ be an injective map in $\mathcal{B}$ and let
$\alpha : N \to uI$ be a morphism.
By adjointness we get a morphism $\alpha : vN \to I$ and
by assumption $v\varphi : vN \to vM$ is injective.
Hence as $I$ is an injective object we get a morphism
$\beta : vM \to I$ extending $\alpha$. By adjointness
again this corresponds to a morphism $\beta : M \to uI$ extending $\alpha$.
Hence (c) is true.

\medskip\noindent
Assume $\mathcal{A}$ has enough injectives and (c) holds.
Let  $f : B \to B'$ be a monomorphism in $\mathcal{B}$, and let
$A = \Ker(v(f))$. Choose a monomorphism $g : A \to I$ with $I$ injective
(it exists by assumption). Then $g$ extends to $g' : v(B) \to I$,
whence by adjunction a morphism $B \to u(I)$. Since $u(I)$ is injective,
this morphism extends to $h : B' \to u(I)$, hence by adjunction a morphism
$k : v(B') \to I$ extending $g'$. But then $k$ "extends'' $g$,
which forces $A = 0$ since $g$ was a monomorphism. Thus (a) is true.
\end{proof}

\begin{remark}
\label{remark-need-left-exactness}
Let $R \to S$ be a ring map. Let $u : \text{Mod}_S \to \text{Mod}_R$
be $u(N) = N_R$ and let $v : \text{Mod}_R \to \text{Mod}_S$ be
$v(M) = M \otimes_R S$. Then $u$ is right adjoint to $v$, and $u$ is
exact and $v$ is right exact. But conditions (a), (b), (c) of
Lemma \ref{lemma-adjoint-preserve-injectives} do not hold in general.
For example, if $R = \mathbf{Z}$ and $S = \mathbf{Z}/p\mathbf{Z}$, then
the injective $S$-module $\mathbf{Z}/p\mathbf{Z}$ is not
an injective $\mathbf{Z}$-module. In fact, the lemma shows
all injective $S$-modules are injective as $R$-modules if and only
if $R \to S$ is a flat ring map.
\end{remark}

\begin{lemma}
\label{lemma-adjoint-enough-injectives}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $u : \mathcal{A} \to \mathcal{B}$ and
$v : \mathcal{B} \to \mathcal{A}$ be additive functors.
Assume
\begin{enumerate}
\item $u$ is right adjoint to $v$,
\item $v$ transforms injective maps into injective maps,
\item $\mathcal{A}$ has enough injectives, and
\item $vB = 0$ implies $B = 0$ for any $B \in \Ob(\mathcal{B})$.
\end{enumerate}
Then $\mathcal{B}$ has enough injectives.
\end{lemma}

\begin{proof}
Pick $B \in \Ob(\mathcal{B})$.
Pick an injection $vB \to I$ for $I$
an injective object of $\mathcal{A}$.
According to Lemma \ref{lemma-adjoint-preserve-injectives}
and the assumptions the corresponding map
$B \to uI$ is the injection of $B$ into an injective object.
\end{proof}

\begin{remark}
\label{remark-faithfulness-needed}
Let $\mathcal{A}$, $\mathcal{B}$, $u : \mathcal{A} \to \mathcal{B}$ and
$v : \mathcal{B} \to \mathcal{A}$ be as
In Lemma \ref{lemma-adjoint-enough-injectives}.
In the presence of conditions (1) and (2) condition (4) is equivalent
to $v$ being faithful. Moreover, condition (4) is needed.
An example is to consider the
case where the functors $u$ and $v$ are both the zero functor.
\end{remark}

\begin{lemma}
\label{lemma-adjoint-functorial-injectives}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $u : \mathcal{A} \to \mathcal{B}$ and
$v : \mathcal{B} \to \mathcal{A}$ be additive functors.
Assume
\begin{enumerate}
\item $u$ is right adjoint to $v$,
\item $v$ transforms injective maps into injective maps,
\item $\mathcal{A}$ has enough injectives,
\item $vB = 0$ implies $B = 0$ for any $B \in \Ob(\mathcal{B})$, and
\item $\mathcal{A}$ has functorial injective embeddings.
\end{enumerate}
Then $\mathcal{B}$ has functorial injective embeddings.
\end{lemma}

\begin{proof}
Let $A \mapsto (A \to J(A))$ be a functorial
injective embedding on $\mathcal{A}$. Then
$B \mapsto (B \to uJ(vB))$ is a functorial
injective embedding on $\mathcal{B}$. Compare with the
proof of Lemma \ref{lemma-adjoint-enough-injectives}.
\end{proof}

\begin{lemma}
\label{lemma-partially-defined-adjoint}
Let $\mathcal{A}$ and $\mathcal{B}$ be abelian categories.
Let $u : \mathcal{A} \to \mathcal{B}$ be a functor.
If there exists a subset $\mathcal{P} \subset \Ob(\mathcal{B})$
such that
\begin{enumerate}
\item every object of $\mathcal{B}$ is a quotient of an element
of $\mathcal{P}$, and
\item for every $P \in \mathcal{P}$ there exists an object
$Q$ of $\mathcal{A}$ such that
$\Hom_\mathcal{A}(Q, A) = \Hom_\mathcal{B}(P, u(A))$ functorially
in $A$,
\end{enumerate}
then there exists a left adjoint $v$ of $u$.
\end{lemma}

\begin{proof}
By the Yoneda lemma (Categories, Lemma \ref{categories-lemma-yoneda})
the object $Q$ of $\mathcal{A}$ corresponding to $P$ is defined up to
unique isomorphism by the formula
$\Hom_\mathcal{A}(Q, A) = \Hom_\mathcal{B}(P, u(A))$. Let us write
$Q = v(P)$. Denote $i_P : P \to u(v(P))$ the map corresponding to
$\text{id}_{v(P)}$ in $\Hom_\mathcal{A}(v(P), v(P))$. Functoriality
in (2) implies that the bijection is given by
$$
\Hom_\mathcal{A}(v(P), A) \to \Hom_\mathcal{B}(P, u(A)),\quad
\varphi \mapsto u(\varphi) \circ i_P
$$
For any pair of elements $P_1, P_2 \in \mathcal{P}$ there is a canonical map
$$
\Hom_\mathcal{B}(P_2, P_1)
\to
\Hom_\mathcal{A}(v(P_2), v(P_1)),\quad
\varphi \mapsto v(\varphi)
$$
which is characterized by the rule
$u(v(\varphi)) \circ i_{P_2} = i_{P_1} \circ \varphi$ in
$\Hom_\mathcal{B}(P_2, u(v(P_1)))$.
Note that $\varphi \mapsto v(\varphi)$ is
compatible with composition; this can be seen directly
from the characterization. Hence $P \mapsto v(P)$ is a functor from
the full subcategory of $\mathcal{B}$ whose objects are the elements
of $\mathcal{P}$.

\medskip\noindent
Given an arbitrary object $B$ of $\mathcal{B}$ choose an exact sequence
$$
P_2 \to P_1 \to B \to 0
$$
which is possible by assumption (1). Define $v(B)$ to be the object of
$\mathcal{A}$ fitting into the exact sequence
$$
v(P_2) \to v(P_1) \to v(B) \to 0
$$
Then
\begin{align*}
\Hom_\mathcal{A}(v(B), A)
& =
\Ker(\Hom_\mathcal{A}(v(P_1), A) \to \Hom_\mathcal{A}(v(P_2), A)) \\
& =
\Ker(\Hom_\mathcal{B}(P_1, u(A)) \to \Hom_\mathcal{B}(P_2, u(A))) \\
& =
\Hom_\mathcal{B}(B, u(A))
\end{align*}
Hence we see that we may take $\mathcal{P} = \Ob(\mathcal{B})$, i.e., we
see that $v$ is everywhere defined.
\end{proof}




\section{Essentially constant systems}
\label{section-essentially-constant}

\noindent
In this section we discuss essentially constant systems with values in
additive categories.

\begin{lemma}
\label{lemma-essentially-constant-into-karoubian}
Let $\mathcal{I}$ be a category, let $\mathcal{A}$ be a pre-additive
Karoubian category, and let $M : \mathcal{I} \to \mathcal{A}$ be a diagram.
\begin{enumerate}
\item Assume $\mathcal{I}$ is filtered. The following are equivalent
\begin{enumerate}
\item $M$ is essentially constant,
\item $X = \colim M$ exists and there exists a cofinal filtered subcategory
$\mathcal{I}' \subset \mathcal{I}$ and for $i' \in \Ob(\mathcal{I}')$
a direct sum decomposition $M_{i'} = X_{i'} \oplus Z_{i'}$ such that
$X_{i'}$ maps isomorphically to $X$ and $Z_{i'}$ to zero in $M_{i''}$
for some $i' \to i''$ in $\mathcal{I}'$.
\end{enumerate}
\item Assume $\mathcal{I}$ is cofiltered. The following are equivalent
\begin{enumerate}
\item $M$ is essentially constant,
\item $X = \lim M$ exists and there exists an initial cofiltered subcategory
$\mathcal{I}' \subset \mathcal{I}$ and for $i' \in \Ob(\mathcal{I}')$
a direct sum decomposition $M_{i'} = X_{i'} \oplus Z_{i'}$
such that $X$ maps isomorphically to $X_{i'}$ and $M_{i''} \to Z_{i'}$
is zero for some $i'' \to i'$ in $\mathcal{I}'$.
\end{enumerate}
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1)(a), i.e., $\mathcal{I}$ is filtered and $M$ is essentially
constant. Let $X = \colim M_i$. Choose $i$ and $X \to M_i$ as in
Categories, Definition
\ref{categories-definition-essentially-constant-diagram}.
Let $\mathcal{I}'$ be the full subcategory consisting of objects
which are the target of a morphism with source $i$.
Suppose $i' \in \Ob(\mathcal{I}')$ and choose a morphism $i \to i'$.
Then $X \to M_i \to M_{i'}$ composed with $M_{i'} \to X$ is the identity
on $X$. As $\mathcal{A}$ is Karoubian, we find a direct summand
decomposition $M_{i'} = X_{i'} \oplus Z_{i'}$, where
$Z_{i'} = \Ker(M_{i'} \to X)$ and $X_{i'}$ maps isomorphically to $X$.
Pick $i \to k$ and $i' \to k$ such that $M_{i'} \to X \to M_i \to M_k$
equals $M_{i'} \to M_k$ as in Categories, Definition
\ref{categories-definition-essentially-constant-diagram}.
Then we see that $M_{i'} \to M_k$ annihilates $Z_{i'}$.
Thus (1)(b) holds.

\medskip\noindent
Assume (1)(b), i.e., $\mathcal{I}$ is filtered and we have
$\mathcal{I}' \subset \mathcal{I}$ and for $i' \in \Ob(\mathcal{I}')$
a direct sum decomposition $M_{i'} = X_{i'} \oplus Z_{i'}$
as stated in the lemma. To see that $M$ is essentially constant
we can replace $\mathcal{I}$ by $\mathcal{I}'$, see
Categories, Lemma \ref{categories-lemma-cofinal-essentially-constant}.
Pick any $i \in \Ob(\mathcal{I})$
and denote $X \to M_i$ the inverse of the isomorphism $X_i \to X$
followed by the inclusion map $X_i \to M_i$. If $j$ is
a second object, then choose $j \to k$ such that $Z_j \to M_k$ is
zero. Since $\mathcal{I}$ is filtered we may also assume there is
a morphism $i \to k$ (after possibly increasing $k$). Then
$M_j \to X \to M_i \to M_k$ and $M_j \to M_k$ both annihilate $Z_j$.
Thus after postcomposing by a morphism $M_k \to M_l$ which annihilates
the summand $Z_k$, we find that $M_j \to X \to M_i \to M_l$ and
$M_j \to M_l$ are equal, i.e., $M$ is essentially constant.

\medskip\noindent
The proof of (2) is dual.
\end{proof}

\begin{lemma}
\label{lemma-direct-sum-from-product-colimit}
Let $\mathcal{I}$ be a category. Let $\mathcal{A}$ be an additive, Karoubian
category. Let $F : \mathcal{I} \to \mathcal{A}$ and
$G : \mathcal{I} \to \mathcal{A}$ be functors. The following are equivalent
\begin{enumerate}
\item $\colim_\mathcal{I} F \oplus G$ exists, and
\item $\colim_\mathcal{I} F$ and $\colim_\mathcal{I} G$ exist.
\end{enumerate}
In this case $\colim_\mathcal{I} F \oplus G =
\colim_\mathcal{I} F \oplus \colim_\mathcal{I} G$.
\end{lemma}

\begin{proof}
Assume (1) holds. Set $W = \colim_\mathcal{I} F \oplus G$.
Note that the projection onto $F$ defines natural transformation
$F \oplus G \to F \oplus G$ which is idempotent. Hence we obtain
an idempotent endomorphism $W \to W$ by
Categories, Lemma \ref{categories-lemma-functorial-colimit}.
Since $\mathcal{A}$ is Karoubian we get a corresponding direct
sum decomposition $W = X \oplus Y$, see Lemma \ref{lemma-karoubian}.
A straightforward argument (omitted) shows that
$X = \colim_\mathcal{I} F$ and $Y = \colim_\mathcal{I} G$.
Thus (2) holds. We omit the proof that (2) implies (1).
\end{proof}

\begin{lemma}
\label{lemma-direct-sum-from-product-essentially-constant}
Let $\mathcal{I}$ be a filtered category. Let $\mathcal{A}$
be an additive, Karoubian category. Let $F : \mathcal{I} \to \mathcal{A}$ and
$G : \mathcal{I} \to \mathcal{A}$ be functors. The following are equivalent
\begin{enumerate}
\item $F \oplus G : \mathcal{I} \to \mathcal{A}$
is essentially constant, and
\item $F$ and $G$ are essentially constant.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1) holds. In particular $W = \colim_\mathcal{I} F \oplus G$ exists
and hence by Lemma \ref{lemma-direct-sum-from-product-colimit}
we have $W = X \oplus Y$ with $X = \colim_\mathcal{I} F$ and
$Y = \colim_\mathcal{I} G$. A straightforward argument (omitted)
using for example the characterization of
Categories, Lemma \ref{categories-lemma-characterize-essentially-constant-ind}
shows that $F$ is essentially constant with value $X$ and $G$ is essentially
constant with value $Y$. Thus (2) holds. The proof that (2) implies (1)
is omitted.
\end{proof}






\section{Inverse systems}
\label{section-inverse-systems}

\noindent
Let $\mathcal{C}$ be a category.
In Categories, Section \ref{categories-section-posets-limits}
we defined the notion of an inverse system over a preordered set
(with values in the category $\mathcal{C}$).
If the preordered set is $\mathbf{N} = \{1, 2, 3, \ldots\}$
with the usual ordering such an inverse system over $\mathbf{N}$
is often simply called an {\it inverse system}. It consists quite simply
of a pair $(M_i, f_{ii'})$ where each $M_i$, $i \in \mathbf{N}$
is an object of $\mathcal{C}$, and for each $i > i'$, $i, i' \in \mathbf{N}$
a morphism $f_{ii'} : M_i \to M_{i'}$ such that moreover
$f_{i'i''} \circ f_{ii'} = f_{ii''}$ whenever this makes sense.
It is clear that in fact it suffices to give the morphisms
$M_2 \to M_1$, $M_3 \to M_2$, and so on. Hence an inverse system
is frequently pictured as follows
$$
M_1 \xleftarrow{\varphi_2} M_2 \xleftarrow{\varphi_3} M_3 \leftarrow \ldots
$$
Moreover, we often omit the transition maps $\varphi_i$ from the notation
and we simply say ``let $(M_i)$ be an inverse system''.

\medskip\noindent
The collection of all inverse systems with values in
$\mathcal{C}$ forms a category with the obvious notion of morphism.

\begin{lemma}
\label{lemma-inverse-systems-abelian}
Let $\mathcal{C}$ be a category.
\begin{enumerate}
\item If $\mathcal{C}$ is an additive category, then the category
of inverse systems with values in $\mathcal{C}$ is an additive category.
\item If $\mathcal{C}$ is an abelian category, then the category
of inverse systems with values in $\mathcal{C}$ is an abelian category.
A sequence $(K_i) \to (L_i) \to (M_i)$ of inverse systems
is exact if and only if each $K_i \to L_i \to N_i$ is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
The limit (see Categories, Section \ref{categories-section-posets-limits})
of such an inverse system is denoted $\lim M_i$, or $\lim_i M_i$.
If $\mathcal{C}$ is the category of abelian groups (or sets), then the limit
always exists and in fact can be described as follows
$$
\lim_i M_i
=
\{(x_i) \in \prod M_i \mid \varphi_i(x_i) = x_{i - 1}, \ i = 2, 3, \ldots\}
$$
see Categories, Section \ref{categories-section-limit-sets}.
However, given a short exact sequence
$$
0 \to (A_i) \to (B_i) \to (C_i) \to 0
$$
of inverse systems of abelian groups it is not always the case
that the associated system of limits is exact. In order to discuss
this further we introduce the following notion.

\begin{definition}
\label{definition-Mittag-Leffler}
Let $\mathcal{C}$ be an abelian category.
We say the inverse system $(A_i)$
satisfies the {\it Mittag-Leffler condition}, or for short
is {\it ML}, if for every $i$ there exists a $c = c(i) \geq i$
such that
$$
\Im(A_k \to A_i) = \Im(A_c \to A_i)
$$
for all $k \geq c$.
\end{definition}

\noindent
It turns out that the Mittag-Leffler condition is good enough to ensure
that the $\lim$-functor is exact, provided one works within
the abelian category of abelian groups, modules over a ring, etc.
It is shown in a paper by A.\ Neeman (see \cite{Neeman-Counterexample})
that this condition is not strong enough in an abelian
category having AB4* (having exact products).

\begin{lemma}
\label{lemma-Mittag-Leffler}
Let
$$
0 \to (A_i) \to (B_i) \to (C_i) \to 0
$$
be a short exact sequence of inverse systems of abelian groups.
\begin{enumerate}
\item In any case the sequence
$$
0 \to \lim_i A_i \to \lim_i B_i \to \lim_i C_i
$$
is exact.
\item If $(B_i)$ is ML, then also $(C_i)$ is ML.
\item If $(A_i)$ is ML, then
$$
0 \to \lim_i A_i \to \lim_i B_i \to \lim_i C_i \to 0
$$
is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Nice exercise. See
Algebra, Lemma \ref{algebra-lemma-Mittag-Leffler} for part (3).
\end{proof}

\begin{lemma}
\label{lemma-apply-Mittag-Leffler}
Let
$$
(A_i) \to (B_i) \to (C_i) \to (D_i)
$$
be an exact sequence of inverse systems of abelian groups. If the
system $(A_i)$ is ML, then the sequence
$$
\lim_i B_i \to \lim_i C_i \to \lim_i D_i
$$
is exact.
\end{lemma}

\begin{proof}
Let $Z_i = \Ker(C_i \to D_i)$ and $I_i = \Im(A_i \to B_i)$.
Then $\lim Z_i = \Ker(\lim C_i \to \lim D_i)$ and
we get a short exact sequence of systems
$$
0 \to (I_i) \to (B_i) \to (Z_i) \to 0
$$
Moreover, by
Lemma \ref{lemma-Mittag-Leffler}
we see that $(I_i)$ has (ML), thus another application of
Lemma \ref{lemma-Mittag-Leffler}
shows that $\lim B_i \to \lim Z_i$ is surjective which
proves the lemma.
\end{proof}

\noindent
The following characterization of essentially constant inverse systems
shows in particular that they have ML.

\begin{lemma}
\label{lemma-essentially-constant}
Let $\mathcal{A}$ be an abelian category.
Let $(A_i)$ be an inverse system in $\mathcal{A}$ with limit $A = \lim A_i$.
Then $(A_i)$ is essentially constant (see
Categories, Definition
\ref{categories-definition-essentially-constant-diagram})
if and only if there exists an $i$ and for all $j \geq i$ a direct sum
decomposition $A_j = A \oplus Z_j$ such that
(a) the maps $A_{j'} \to A_j$ are compatible with the direct sum
decompositions, (b) for all $j$ there exists some $j' \geq j$ such that
$Z_{j'} \to Z_j$ is zero.
\end{lemma}

\begin{proof}
Assume $(A_i)$ is essentially constant. Then there exists an $i$ and
a morphism $A_i \to A$ such that $A \to A_i \to A$ is the identity and
for all $j \geq i$ there exists
a $j' \geq j$ such that $A_{j'} \to A_j$ factors as
$A_{j'} \to A_i \to A \to A_j$ (the last map comes from $A = \lim A_i$).
Hence setting $Z_j = \Ker(A_j \to A)$ for all $j \geq i$ works.
Proof of the converse is omitted.
\end{proof}

\noindent
We will improve on the following lemma in
More on Algebra, Lemma \ref{more-algebra-lemma-Mittag-Leffler}.

\begin{lemma}
\label{lemma-exact-sequence-ML}
Let
$$
0 \to (A_i) \to (B_i) \to (C_i) \to 0
$$
be an exact sequence of inverse systems of abelian groups.
If $(C_i)$ is essentially constant, then $(A_i)$ has ML
if and only if $(B_i)$ has ML.
\end{lemma}

\begin{proof}
After renumbering we may assume that $C_i = C \oplus Z_i$ compatible with
transition maps and that for all $i$ there exists an $i' \geq i$ such that
$Z_{i'} \to Z_i$ is zero, see Lemma \ref{lemma-essentially-constant}.

\medskip\noindent
First, assume $C = 0$, i.e., we have $C_i = Z_i$.
In this case choose $1 = n_1 < n_2 < n_3 < \ldots$
such that $Z_{n_{i + 1}} \to Z_{n_i}$ is zero.
Then $B_{n_{i + 1}} \to B_{n_i}$ factors through $A_{n_i} \subset B_{n_i}$.
It follows that for $j \geq i + 1$ we have
$$
\Im(A_{n_j} \to A_{n_i}) \subset \Im(B_{n_j} \to B_{n_i}) \subset
\Im(A_{n_{j - 1}} \to A_{n_i})
$$
as subsets of $A_{n_i}$.
Thus the images $\Im(A_{n_j} \to A_{n_i})$ stabilize for $j \geq i + 1$
if and only if the same is true for the images $\Im(B_{n_j} \to B_{n_i})$.
The equivalence follows from this (small detail omitted).

\medskip\noindent
If $C \not = 0$, denote $B'_i \subset B_i$ the inverse image
of $C$ by the map $B_i \to C \oplus Z_i$. Then by the previous
paragraph we see that $(B'_i)$ has ML if and only if $(B_i)$
has ML. Thus we may replace $(B_i)$ by $(B'_i)$.
In this case we have exact sequences $0 \to A_i \to B_i \to C \to 0$
for all $i$. It follows that
$0 \to \Im(A_j \to A_i) \to \Im(B_j \to B_i) \to C \to 0$
is short exact for all $j \geq i$. Hence the images
$\Im(A_j \to A_i)$ stabilize for $j \geq i$
if and only if the same is true for $\Im(B_j \to B_i)$
as desired.
\end{proof}

\noindent
The ``correct'' version of the following lemma is
More on Algebra, Lemma \ref{more-algebra-lemma-apply-Mittag-Leffler-again}.

\begin{lemma}
\label{lemma-apply-Mittag-Leffler-again}
Let
$$
(A^{-2}_i \to A^{-1}_i \to A^0_i \to A^1_i)
$$
be an inverse system of complexes of abelian groups and denote
$A^{-2} \to A^{-1} \to A^0 \to A^1$ its limit. Denote
$(H_i^{-1})$, $(H_i^0)$ the inverse systems of cohomologies, and
denote $H^{-1}$, $H^0$ the cohomologies of $A^{-2} \to A^{-1} \to A^0 \to A^1$.
If $(A^{-2}_i)$ and $(A^{-1}_i)$ are ML and
$(H^{-1}_i)$ is essentially constant, then
$H^0 = \lim H_i^0$.
\end{lemma}

\begin{proof}
Let $Z^j_i = \Ker(A^j_i \to A^{j + 1}_i)$ and
$I^j_i = \Im(A^{j - 1}_i \to A^j_i)$.
Note that $\lim Z^0_i = \Ker(\lim A^0_i \to \lim A^1_i)$ as
taking kernels commutes with limits.
The systems $(I^{-1}_i)$ and $(I^0_i)$ have ML as quotients of
the systems $(A^{-2}_i)$ and $(A^{-1}_i)$, see
Lemma \ref{lemma-Mittag-Leffler}.
Thus an exact sequence
$$
0 \to (I^{-1}_i) \to (Z^{-1}_i) \to (H^{-1}_i) \to 0
$$
of inverse systems where $(I^{-1}_i)$ has ML
and where $(H^{-1}_i)$ is essentially constant by assumption.
Hence $(Z^{-1}_i)$ has ML by
Lemma \ref{lemma-exact-sequence-ML}.
The exact sequence
$$
0 \to (Z^{-1}_i) \to (A^{-1}_i) \to (I^0_i) \to 0
$$
and an application of
Lemma \ref{lemma-Mittag-Leffler}
shows that $\lim A^{-1}_i \to \lim I^0_i$ is surjective.
Finally, the exact sequence
$$
0 \to (I^0_i) \to (Z^0_i) \to (H^0_i) \to 0
$$
and
Lemma \ref{lemma-Mittag-Leffler}
show that $\lim I^0_i \to \lim Z^0_i \to \lim H^0_i \to 0$
is exact. Putting everything together we win.
\end{proof}

\noindent
Sometimes we need a version of the lemma above where we take limits
over big ordinals.

\begin{lemma}
\label{lemma-ML-over-ordinals}
Let $\alpha$ be an ordinal. Let $K_\beta^\bullet$, $\beta < \alpha$
be an inverse system of complexes of abelian groups over $\alpha$. If
for all $\beta < \alpha$ the complex $K_\beta^\bullet$ is acyclic and
the map
$$
K^n_\beta \longrightarrow \lim_{\gamma < \beta} K^n_\gamma
$$
is surjective, then the complex
$\lim_{\beta < \alpha} K_\beta^\bullet$ is acyclic.
\end{lemma}

\begin{proof}
By transfinite induction we prove this holds for every ordinal
$\alpha$ and every system as in the lemma. In particular, whilst
proving the result for $\alpha$ we may assume the complexes
$\lim_{\gamma < \beta} K^n_\gamma$ are acyclic.

\medskip\noindent
Let $x \in \lim_{\beta < \alpha} K^0_\beta$ with $\text{d}(x) = 0$.
We will find a $y \in \lim_{\beta < \alpha} K^{-1}_\beta$
with $\text{d}(y) = x$.
Write $x = (x_\beta)$ where $x_\beta \in K_\beta^0$ is the
image of $x$ for $\beta < \alpha$. We will construct $y = (y_\beta)$
by transfinite recursion.

\medskip\noindent
For $\beta = 0$ let $y_0 \in K_0^{-1}$
be any element with $\text{d}(y_0) = x_0$.

\medskip\noindent
For $\beta = \gamma + 1$ a successor, we have to find an element $y_\beta$
which maps both to $y_\gamma$ by the transition map
$f : K^\bullet_\beta \to K^\bullet_\gamma$ and to $x_\beta$ under the
differential. As a first approximation we choose $y'_\beta$ with
$\text{d}(y'_\beta) = x_\beta$. Then the difference $y_\gamma - f(y'_\beta)$
is in the kernel of the differential, hence equal to $\text{d}(z_\gamma)$
for some $z_\gamma \in K^{-2}_\gamma$.
By assumption, the map $f^{-2} : K^{-2}_\beta \to K^{-2}_\gamma$
is surjective. Hence we write $z_\gamma = f(z_\beta)$
and change $y'_\beta$ into $y_\beta = y'_\beta + \text{d}(z_\beta)$
which works.

\medskip\noindent
If $\beta$ is a limit ordinal, then we have the element
$(y_\gamma)_{\gamma < \beta}$ in $\lim_{\gamma < \beta} K^{-1}_\gamma$
whose differential is the image of $x_\beta$. Thus we can argue in exactly
the same manner as above using the termwise surjective map of complexes
$f : K_\beta^\bullet \to \lim_{\gamma < \beta} K_\gamma^\bullet$
and the fact (see first paragraph of proof) that we may assume
$\lim_{\gamma < \beta} K_\gamma^\bullet$ is acyclic by induction.
\end{proof}


\section{Exactness of products}
\label{section-product-exact}


\begin{lemma}
\label{lemma-product-abelian-groups-exact}
Let $I$ be a set. For $i \in I$ let $L_i \to M_i \to N_i$ be a complex
of abelian groups. Let $H_i = \Ker(M_i \to N_i)/\Im(L_i \to M_i)$
be the cohomology. Then
$$
\prod L_i \to \prod M_i \to \prod N_i
$$
is a complex of abelian groups with homology $\prod H_i$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}






\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
